- 到 https://sourceforge.net/projects/fastdfs/ 或 https://github.com/happyfish100/fastdfs 下载源码
- 需要先安装 libfastcommon https://github.com/happyfish100/libfastcommon
- 按照 INSTALL的说明安装
- 修改 /etc/fdfs下的配置文件
- tracker.conf
修改 base_path - storage.conf
修改 base_path, store_path0, tracker_server - client.conf
base_path, tracker_server
- tracker.conf
- 启动
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
- 上传文件
/usr/bin/fdfs_test /etc/fdfs/client.conf upload /home/tom/aaa.txt
http访问
需要安装 nginx和fastdfs-nginx-module
1. 安装 nginx时报错:
/mydev/fastdfs-nginx-module/src/common.c:21:25: 致命错误:fdfs_define.h:没有那个文件或目录
解决:
修改 fastdfs-nginx-module/src/config中的
$CORE_INCS /usr/local/include/fastdfs /usr/local/include/fastcommon
为
$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon
2. 按INSTALL安装 fastdfs-nginx-module
3. nginx启动报错:
找不到 /etc/fdfs/mod_fastdfs.conf
解决:
复制 /fastdfs-nginx-module/src/mod_fastdfs.conf 到 /etc/fdfs
4. 访问 http://xxx.xxx.xxx.xxx/M00/00/00/wKi6A1ZkTqmAKHXxAAAADEVYxUM214_big.txt