安装libevent

tar zxvf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21
./configure && make && make install
ln -s /usr/local/lib/libevent* /lib64/


安装FastDFS

tar zxvf tar zxvf FastDFS_v4.08.tar.gz
cd FastDFS
sed -i 's/#WITH_LINUX_SERVICE=1/WITH_LINUX_SERVICE=1/g' make.sh #安装为服务
./make.sh
./make install
mkdir -p /data/tracker
mkdir -p /data/storage
#启动tracker
service fdfs_trackerd start
#启动stroage
service fdfs_stroaged start


安装nginx

yum install pcre pcre-devel zlib zlib-devel
./configure --prefix=/usr/local/nginx --add-module=/usr/local/src/FastDFS/fastdfs-nginx-module/src
make && make install
cp /usr/local/src/FastDFS/fastdfs-nginx-module/src/mod_fastdfs.conf  /etc/fdfs/


上传测试

fdfs_upload_file  /etc/fdfs/client.conf  /etc/grub.conf


监控状态

fdfs_monitor /etc/fdfs/client.conf


配置文件详解

http://bbs.chinaunix.net/thread-1941456-1-1.html


参考文档

http://www.open-open.com/lib/view/open1435468300700.html