参考:http://linux.chinaunix.net/bbs/thread-1158975-1-1.html
FastDFS从V1.20开始支持通过HTTP协议下载文件,作者推荐的配置方案为:tracker使用自带的Web Server,storage server上架设其他Web Server,如nginx、apache。
按上述方案进行了配置,配置过程如下:
一、配置tracker服务器
1、切换到FastDFS 主目录:
cd FastDFS
(1)打开make.sh文件,找到 #WITH_HTTPD=1 ,去掉最前面的#,保存;
(2)依次执行以下脚本:
./make.sh clean ./make.sh ./make.sh install
注意:
1)HTTP用到了libevent,如果没有安装,编译程序前需要先安装(需要1.4.x版本),目前已有libevent-1.4.12-stable版本,libevent安装方法详见 libevent安装方法 。
2)执行./make.sh install时可能需要root权限。
2、修改tracker配置,打开tracker.conf ,找到下列片段,将值改为与红色 部分一致,蓝色 部分视实际端口占用情况自行选择是否修改:
# HTTP port on this tracker server
http.server_port= 8080
#use "#include" directive to include http other settiongs
#include http.conf
3、重启tracker服务: