centOS 6.5 Nginx集成fastDFS模块
安装fastdfs-nginx-module
下载地址:https://github.com/happyfish100/fastdfs-nginx-module/archive/master.zip
unzip master.zip
进入Nginx目录配置模块,我用的是相对路径,也可以改成绝对路径。
./configure --add-module=../fastdfs-nginx-module-master/src/ make make install
配置fastdfs-nginx-module和Nginx
cd /fastdfs-nginx-module-master/src vim mod_fastdfs.conf
修改内容
tracker_server=192.168.92.128:22122 url_have_group_name=true store_path0=/data/fastdfs/storage
将配置文件拷贝到/etc/fdfs下
cp mod_fastdfs.conf /etc/fdfs
把fastdfs-5.05下面的配置拷贝到/etc/fdfs/
cd /fastdfs-5.05/conf cp anti-steal.jpg http.conf mime.types /etc/fdfs/
配置Nginx
cd /usr/local/nginx/conf vi nginx.conf
在配置中加入
location /group1/M00 { root /data/fastdfs/storage/; ngx_fastdfs_module; }
创建软链接
mkdir /data/fastdfs/storage/data/group1 ln -s /data/fastdfs/storage/data /data/fastdfs/storage/data/group1/M00
启动Nginx
/usr/local/nginx/sbin/nginx
测试下载
OK!
相关推荐
joynet00 2020-06-21
zhangskd 2020-06-21
loviezhang 2020-05-30
wqbala 2020-05-10
isHooky 2020-05-05
tianlong 2020-05-01
carolAnn 2020-04-26
diediexiaomi 2020-04-19
liusaisoso 2020-04-18
Cheetahcubs 2020-03-01
zhangll00 2020-02-12
baixiaoshi 2020-01-29
tianlong 2020-01-29
我爱熊猫 2020-01-28
CSDNMrWang 2013-06-27
憧憬 2019-12-20