centos 系統下安裝配置FastDFS步驟: 1:安裝libevent(libevent-2.0.16-stable) ##卸載系統自帶libevent rpm -qa|grep libevent rpm -e libevent* ##為Trackerd和Storaged節點節點安裝libevent cd /home/ylh wget http://unclelu-server.googlecode.com/files/libevent-2.0.16-stable.tar.gz tar -zxvf libevent-2.0.16-stable.tar.gz cd libevent-2.0.16-stable make clean ./configure make make install ##為libevent創建軟鏈接到/lib庫下,64位系統對應/lib64 ln -s /usr/local/lib/libevent* /lib/ ln -s /usr/local/lib/libevent* /lib64/
2:為Trackerd節點安裝FastDFS,并修改配置文件/etc/fdfs/tracker.conf( 如果Trackerd需要使用內置的web server,需要修改make文件,啟用WITH_HTTPD=1再編譯) cd /home/ylh wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz tar -zxvf FastDFS_v3.06.tar.gz cd FastDFS_v3.06 ./make.sh ./make.sh install ##創建存儲目錄 mkdir /home/ylh/fastdfs ##修改配置文件. vim /etc/fdfs/tracker.conf 修改后保存退出 ##啟動Trackerd /usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf
3:為Storaged節點安裝FastDFS, Storaged節點也需要libevent,安裝步驟參見第一步 cd /home/ylh wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz tar -zxvf FastDFS_v3.06.tar.gz cd FastDFS_v3.06 ./make.sh ./make.sh install
4:為Storaged節點安裝web服務器,Storaged節點可以使用nginx或者apache提供http下載服務。這里我們選用nginx。 cd /home/ylh wget http://nginx.org/download/nginx-0.8.55.tar.gz tar zxvf nginx-0.8.55.tar.gz cd nginx-0.8.55 ./configure –prefix=/opt/nginx –with-http_stub_status_module make make install
5:為Storaged節點安裝fastdfs-nginx-module cd /home/ylh wget http://fastdfs.googlecode.com/files/fastdfs-nginx-module_v1.10.tar.gz tar xzf fastdfs_nginx_module_v1.05.tar.gz cd /home/ylh/nginx-0.8.55 ./configure –add-module=/home/ylh/fastdfs-nginx-module/src make; make install