-----------------------------------------------------fdfs------------------------------------------------
存储地址:
storage和tracker的base_path:/home/fastdfs
store_path0=/home/fastdfs/fdfs_storage
启动tracker
/etc/init.d/fdfs_trackerd start
启动storage
/etc/init.d/fdfs_storaged start
cd /home/fastdfs/ && ll
----------------------nginx--------------------
./configure \
--prefix=/usr/local/nginx \
--add-module=/data/program/software/fastdfs-nginx-module/src/
上面需要指定好fastdfs-nginx-module模块的位置
make
make install
./configure && make && make install
创建软连接,将其链接到实际存放数据的目录:
ln -s /home/fastdfs/fdfs_storage/data/ /home/fastdfs/fdfs_storage/data/M00
开机自启动文件:
/etc/rc.d/rc.local
启动nginx:
/usr/local/nginx/sbin/nginx
命令集:
1.查看nginx在哪里用whereis nginx
2.查看状态ps -aux | grep nginx
3.nginx配置文件:
location ~/group[0-9]/M00 {
#root/home/FastDFS/fdfs_storage/data;
ngx_fastdfs_module;
}
测试:
/usr/bin/fdfs_upload_file /etc/fdfs/client.conf /data/program/software/timg.jpg
访问:192.168.233.128:8888/group1/M00/00/00/wKjpgFyZ1WuAWBNtAAA79ygMiuQ602.jpg