1. [安装]
    2. yum install update
    3. yum install wget vim net-tools unzip gcc make -y # 依赖FASTDFS
    4. yum install gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel -y # nginx
    5. [下载解压]
    6. wget https://github.com/happyfish100/libfastcommon/archive/V1.0.7.tar.gz && tar -zxvf V1.0.7.tar.gz
    7. wget https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz && tar -zxvf V5.05.tar.gz
    8. wget -c https://nginx.org/download/nginx-1.12.1.tar.gz && tar -zxvf nginx-1.12.1.tar.gz
    9. wget https://github.com/happyfish100/fastdfs-nginx-module/archive/5e5f3566bbfa57418b5506aaefbe107a42c9fcb1.zip
    10. unzip 5e5f3566bbfa57418b5506aaefbe107a42c9fcb1.zip && mv fastdfs-nginx-module-5e5f3566bbfa57418b5506aaefbe107a42c9fcb1 fastdfs-nginx-module-master
    11. [编译安装]
    12. cd /opt/libfastcommon-1.0.7 && ./make.sh && ./make.sh install
    13. cd /opt/fastdfs-5.05 && ./make.sh && ./make.sh install
    14. cd /opt/nginx-1.12.1 && ./configure --add-module=/opt/fastdfs-nginx-module-master/src
    15. cd /opt/nginx-1.12.1 && make && make install
    16. [配置链接]
    17. ln -s /usr/bin/fdfs_trackerd /usr/local/bin && ln -s /usr/bin/fdfs_storaged /usr/local/bin
    18. ln -s /usr/bin/stop.sh /usr/local/bin && ln -s /usr/bin/restart.sh /usr/local/bin
    19. ln -s /usr/local/nginx/sbin/nginx /usr/local/bin
    20. [配置]
    21. cd /etc/fdfs && mkdir -p /opt/data/fastdfs/tracker && cp tracker.conf.sample tracker.conf
    22. cd /etc/fdfs && vim tracker.conf
    23. # base_path=/opt/data/fastdfs/tracker
    24. # http.server_port=8001 # 8080 HTTP port on this tracker server
    25. cd /etc/fdfs && mkdir -p /opt/data/fastdfs/storage && mkdir -p /opt/data/fastdfs/file && cp storage.conf.sample storage.conf
    26. cd /etc/fdfs && vim storage.conf
    27. # base_path=/opt/data/fastdfs/storage
    28. # store_path0=/opt/data/fastdfs/file
    29. # tracker_server=thinxz.cn:22122
    30. # http.server_port=8001 # 8888 the port of the web server on this storage server
    31. [运行]
    32. cd /etc/init.d/ && ./fdfs_trackerd start
    33. cd /etc/init.d/ && ./fdfs_storaged start
    34. []
    35. :/usr/bin/fdfs_monitor /etc/fdfs/storage.conf