[安装] :yum install update :yum install wget vim net-tools unzip gcc make -y # 依赖FASTDFS :yum install gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel -y # nginx[下载解压] :wget https://github.com/happyfish100/libfastcommon/archive/V1.0.7.tar.gz && tar -zxvf V1.0.7.tar.gz :wget https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz && tar -zxvf V5.05.tar.gz :wget -c https://nginx.org/download/nginx-1.12.1.tar.gz && tar -zxvf nginx-1.12.1.tar.gz :wget https://github.com/happyfish100/fastdfs-nginx-module/archive/5e5f3566bbfa57418b5506aaefbe107a42c9fcb1.zip :unzip 5e5f3566bbfa57418b5506aaefbe107a42c9fcb1.zip && mv fastdfs-nginx-module-5e5f3566bbfa57418b5506aaefbe107a42c9fcb1 fastdfs-nginx-module-master[编译安装] :cd /opt/libfastcommon-1.0.7 && ./make.sh && ./make.sh install :cd /opt/fastdfs-5.05 && ./make.sh && ./make.sh install :cd /opt/nginx-1.12.1 && ./configure --add-module=/opt/fastdfs-nginx-module-master/src :cd /opt/nginx-1.12.1 && make && make install[配置链接] :ln -s /usr/bin/fdfs_trackerd /usr/local/bin && ln -s /usr/bin/fdfs_storaged /usr/local/bin :ln -s /usr/bin/stop.sh /usr/local/bin && ln -s /usr/bin/restart.sh /usr/local/bin :ln -s /usr/local/nginx/sbin/nginx /usr/local/bin[配置] :cd /etc/fdfs && mkdir -p /opt/data/fastdfs/tracker && cp tracker.conf.sample tracker.conf :cd /etc/fdfs && vim tracker.conf # base_path=/opt/data/fastdfs/tracker # http.server_port=8001 # 8080 HTTP port on this tracker server :cd /etc/fdfs && mkdir -p /opt/data/fastdfs/storage && mkdir -p /opt/data/fastdfs/file && cp storage.conf.sample storage.conf :cd /etc/fdfs && vim storage.conf # base_path=/opt/data/fastdfs/storage # store_path0=/opt/data/fastdfs/file # tracker_server=thinxz.cn:22122 # http.server_port=8001 # 8888 the port of the web server on this storage server[运行] :cd /etc/init.d/ && ./fdfs_trackerd start :cd /etc/init.d/ && ./fdfs_storaged start[] : :/usr/bin/fdfs_monitor /etc/fdfs/storage.conf