完整安装流程下载的包都存放在~/caibh/fdfs-package目录下。下载libfastcommon、fastdfs、fastdfs-nginx-module:cd ~/caibh/fdfs-package# -S print server response# -O write documents to filewget https://github.com/happyfish100/libfastcommon/archive/V1.0.39.tar.gz -SO libfastcommon.tar.gzwget https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz -SO fastdfs.tar.gzwget https://github.com/happyfish100/fastdfs-nginx-module/archive/V1.20.tar.gz -SO fastdfs-nginx-module.tar.gz# 解压tar -xf xxx.tar.gz 安装 libfastcommoncd ~/caibh/fdfs-packagecd libfastcommon-1.0.39./make.sh./make.sh install安装 fastdfscd ~/caibh/fdfs-packagecd fastdfs-5.11./make.sh./make.sh install安装好后,程序是在/usr/bin目录下:$ which fdfs_trackerd/usr/bin/fdfs_trackerd而配置文件是在/etc/fdfs目录下:$ cd /caibh/fdfs-package/fastdfs-5.11$ ls /etc/fdfsclient.conf.sample storage_ids.conf.sample tracker.conf.sample storage.conf.sample但是这些配置文件是不全的,而且都是模板,所以需要从fastdfs包中拷贝过来,并修改配置:$ cd /caibh/fdfs-package/fastdfs-5.11/conf$ lsanti-steal.jpg client.conf http.conf mime.types storage.conf storage_ids.conf tracker.conf$ sudo cp /caibh/fdfs-package/fastdfs-5.11/conf/* /etc/fdfs修改配置sudo vi /etc/fdfs/tracker.conf:# the tracker server portport=22122# the base path to store data and log filesbase_path=/home/caibh/fdfs# HTTP port on this tracker serverhttp.server_port=9270sudo vi /etc/fdfs/storage.conf:# storage所属的组group_name=group1# the storage server portport=23000# the base path to store data and log filesbase_path=/home/caibh/fdfs# store_path#, based 0, if store_path0 not exists, it’s value is base_path# the paths must be existstore_path0=/home/caibh/fdfs#store_path1=/home/caibh/fdfs2# tracker服务器,虽然是同一台机器上,但是不能写127.0.0.1。这项配置可以出现一次或多次tracker_server=191.8.1.77:22122# the port of the web server on this storage serverhttp.server_port=8888sudo vi /etc/fdfs/client.conf:# the base path to store log filesbase_path=/home/caibh/fdfs/client# tracker_server can ocur more than once, and tracker_server format is# “host:port”, host can be hostname or ip addresstracker_server=191.8.1.77:22122#HTTP settingshttp.tracker_server_port=9270sudo vi /etc/fdfs/mod_fastdfs.conf:# the base path to store log filesbase_path=/tmp# FastDFS tracker_server can ocur more than once, and tracker_server format is# “host:port”, host can be hostname or ip address# valid only when load_fdfs_parameters_from_tracker is truetracker_server=191.8.1.77:22122# the port of the local storage server# the default value is 23000storage_server_port=23000# the group name of the local storage servergroup_name=group1# store_path#, based 0, if store_path0 not exists, it’s value is base_path# the paths must be exist# must same as storage.confstore_path0=/home/caibh/fdfs#store_path1=/home/yuqing/fastdfs1配置过程中有几点要注意:确保配置中用到的目录已经创建了。比如/fdfs/client、/fdfs/data、/fdfs/logs确保各种配置文件之间引用的端口一直。比如:mod_fastdfs.conf文件中tracker_server的端口应该跟tracker.conf中port一致;mod_fastdfs.conf文件中storage_server_port的端口应该跟跟storage.conf中port一致;其他配置或文件虽然不用修改,但是fastdfs-nginx-module模块会用到:anti-steal.jpghttp.confmime.types启动tracker和storage:# 启动fdfs_trackerd /etc/fdfs/tracker.conf startfdfs_storaged /etc/fdfs/storage.conf start# 查看日志tail -n10 ~/fdfs/logs/trackerd.logtail -n10 ~/fdfs/logs/storaged.log# 如果日志显示有错误信息,需要根据信息来查找错误原因用fdfs_test测试上传$ fdfs_test /etc/fdfs/client.conf upload ~/caibh/test_images/XinXiJuZhiWang.jpg安装fastdfs-nginx-module思路:安装过程比较复杂,由于当前系统已经有一个nginx在运行了,所以要先确认当前系统nginx的版本,然后到官网下载对应版本的nginx源码,然后查看系统nginx的编译选项,用一模一样的编译选项外加fastdfs-nginx-module的源码,重新编译一个nginx程序。用新的nginx替换系统的nginx。注意:这里的安装场景是tracker和storage都装在同一个机器上。查看已安装并在运行中的nginx的版本:$ nginx -vnginx version: nginx/1.10.3 (Ubuntu)到官网下载对应版本的nginx源码,并解压,改名为nginx-src,然后进入nginx-src目录查看当前运行的ngxin原来的编译选项:$ cd ~/caibh/nginx-src$ nginx -Vnginx version: nginx/1.10.3 (Ubuntu)built with OpenSSL 1.0.2g 1 Mar 2016TLS SNI support enabledconfigure arguments: –with-cc-opt=’-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2’ –with-ld-opt=’-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now’ –prefix=/usr/share/nginx –conf-path=/etc/nginx/nginx.conf –http-log-path=/var/log/nginx/access.log –error-log-path=/var/log/nginx/error.log –lock-path=/var/lock/nginx.lock –pid-path=/run/nginx.pid –http-client-body-temp-path=/var/lib/nginx/body –http-fastcgi-temp-path=/var/lib/nginx/fastcgi –http-proxy-temp-path=/var/lib/nginx/proxy –http-scgi-temp-path=/var/lib/nginx/scgi –http-uwsgi-temp-path=/var/lib/nginx/uwsgi –with-debug –with-pcre-jit –with-ipv6 –with-http_ssl_module –with-http_stub_status_module –with-http_realip_module –with-http_auth_request_module –with-http_addition_module –with-http_dav_module –with-http_geoip_module –with-http_gunzip_module –with-http_gzip_static_module –with-http_image_filter_module –with-http_v2_module –with-http_sub_module –with-http_xslt_module –with-stream –with-stream_ssl_module –with-mail –with-mail_ssl_module –with-threads为了方便编辑,复制上面信息,在nginx-src目录下创建一个custom_configure.sh文件,把复制的内容拷贝进去,并在最后加上fastdfs-nginx-module的源码:$ cd /caibh/nginx-src$ cat custom_configure.sh ./configure --with-cc-opt=’-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2’ --with-ld-opt=’-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now’ --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-threads --add-module=/caibh/fdfs-package/fastdfs-nginx-module-1.20/src执行custom_configure.sh:# ~/caibh/nginx-src# 执行编译$ sudo ./custom_configure.sh # 报错./configure: error: the HTTP XSLT module requires the libxml2/libxsltlibraries. You can either do not enable the module or install the libraries.# 解决sudo apt-get install libxml2 libxml2-dev libxslt-dev# 再次执行$ sudo ./custom_configure.sh # 报错./configure: error: the HTTP image filter module requires the GD library.You can either do not enable the module or install the libraries.#解决sudo apt-get install libgd-dev# 再次执行$ sudo ./custom_configure.sh # 报错./configure: error: the GeoIP module requires the GeoIP library.You can either do not enable the module or install the library.# 搜索$ sudo apt-cache search geoipgeoclue-ubuntu-geoip - Provide positioning for GeoClue via Ubuntu GeoIP servicesgeoip-bin - IP lookup command line tools that use the GeoIP librarygeoip-database - IP lookup command line tools that use the GeoIP library (country database)geoip-dbg - debugging symbols for the GeoIP packageslibgeoip-dev - Development files for the GeoIP library…..# 解决$ sudo apt-install libgeoip-dev执行后有用的信息,通过这些信息可以知道编译出来的nginx会装到哪里,配置文件会放在哪里,错误日志会放在哪里:Configuration summary + using threads + using system PCRE library + using system OpenSSL library + md5: using OpenSSL library + sha1: using OpenSSL library + using system zlib library nginx path prefix: “/usr/share/nginx” nginx binary file: “/usr/share/nginx/sbin/nginx” nginx modules path: “/usr/share/nginx/modules” nginx configuration prefix: “/etc/nginx” nginx configuration file: “/etc/nginx/nginx.conf” nginx pid file: “/run/nginx.pid” nginx error log file: “/var/log/nginx/error.log” nginx http access log file: “/var/log/nginx/access.log” nginx http client request body temporary files: “/var/lib/nginx/body” nginx http proxy temporary files: “/var/lib/nginx/proxy” nginx http fastcgi temporary files: “/var/lib/nginx/fastcgi” nginx http uwsgi temporary files: “/var/lib/nginx/uwsgi” nginx http scgi temporary files: “/var/lib/nginx/scgi"停止nginx,并备份原来的nginx执行文件,和配置文件:$ which nginx/usr/sbin/nginx$ sudo cp /usr/sbin/nginx /usr/sbin/nginx_org_bak$ sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak继续在nginx-src目录执行make和make install:$ cd ~/caibh/nginx-src$ sudo make# 报错Fatal error: can’t create objs/addon/src/ngx_http_fastdfs_module.o: Permission deniedIn file included from /home/xxxx/caibh/fdfs-package/fastdfs-nginx-module-1.20/src/common.c:26:0, from /home/xxxx/caibh/fdfs-package/fastdfs-nginx-module-1.20/src/ngx_http_fastdfs_module.c:6:/usr/include/fastdfs/fdfs_define.h:15:27: fatal error: common_define.h: No such file or directory# 解决# 修改fastdfs-nginx-module的src/config文件$ cd /home/xxxx/caibh/fdfs-package/fastdfs-nginx-module-1.20/src$ sudo vi config# 修改一下两项:ngx_module_incs="/usr/include/fastdfs /usr/include/fastcommon/“CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/”# 重新运行 nginx-src/custom_configure.sh$ pwd/home/xxxx/caibh/nginx-src$ sudo ./custom_configure.sh$ sudo make$ sudo make install# make install 会在/usr/share/nginx/sbin目录下生成一个名为nginx的可执行文件$ sudo ls /usr/share/nginxhtml sbin关闭系统原有的nginx,并备份好系统原来的nginx文件:sudo nginx -s stopcd /usr/sbinsudo cp mv /usr/sbin/nginx /usr/sbin/nginx_bak备份好后创建一个软链接,放在/usr/sbin目录下:# 检查自己编译出来的nginx能否运行$ ./nginx -vnginx version: nginx/1.10.3# 创建软链接$ sudo ln -s /usr/share/nginx/sbin/nginx /usr/sbin/nginx配置nginx,加入路由规则,映射到fastdfs的数据目录:# config for fastdfs-nginx-moduleserver { listen 8777; location /M00 { root /fdfs/data; ngx_fastdfs_module; }}开放端口:sudo iptables -A IN_public_allow -p tcp –dport 8777 -j ACCEPTsudo iptables -L -n测试上传图片:$ fdfs_test /etc/fdfs/client.conf upload /caibh/test_images/XinXiJuZhiWang.jpgThis is FastDFS client test program v5.11Copyright (C) 2008, Happy Fish / YuQingFastDFS may be copied only under the terms of the GNU GeneralPublic License V3, which may be found in the FastDFS source kit.Please visit the FastDFS Home Page http://www.csource.org/ for more detail.[2019-02-22 14:54:33] DEBUG - base_path=/home/xxxx/fdfs/client, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0tracker_query_storage_store_list_without_group: server 1. group_name=, ip_addr=191.8.2.203, port=23000group_name=group1, ip_addr=191.8.2.203, port=23000storage_upload_by_filenamegroup_name=group1, remote_filename=M00/00/00/vwgCy1xvnKmAIDXDAAEM3XOobI4945.jpgsource ip address: 191.8.2.203file timestamp=2019-02-22 14:54:33file size=68829file crc32=1940417678example file url: http://191.8.2.203:9270/group1/M00/00/00/vwgCy1xvnKmAIDXDAAEM3XOobI4945.jpgstorage_upload_slave_by_filenamegroup_name=group1, remote_filename=M00/00/00/vwgCy1xvnKmAIDXDAAEM3XOobI4945_big.jpgsource ip address: 191.8.2.203file timestamp=2019-02-22 14:54:33file size=68829file crc32=1940417678example file url: http://191.8.2.203:9270/group1/M00/00/00/vwgCy1xvnKmAIDXDAAEM3XOobI4945_big.jpg访问:http://191.8.2.203:8777/M00/00/00/vwgCy1xvnKmAIDXDAAEM3XOobI4945_big.jpg# 如果能看到图片则表示安装fastdfs-nginx-module成功附录1:FastDFS 官网介绍FastDFS是一款高性能的分布式文件系统。主要功能包括:文件存储,文件同步,文件访问(上传下载)。它可以解决高容量和负载均衡的问题。FastDFS适合用来做文件相关的网站,如图片分享、视频分享等。FastDFS有两种角色:tracker和storage。tracker负责文件访问的跟踪和负载均衡。storage负责存储文件,它的功能包括:文件存储、文件同步、提供文件访问接口,storage还负责管理文件的元数据,这些数据是以键值对的形式表示的,如:width=1024,键是“width”,值是“1024”。tracker和storage可以是一个或多个服务器。在tracker或storage的集群中,任何时候都可以从中删除服务器,对线上服务没有任何影响。tracker集群中的服务器是点对点的。存储服务器以 卷/组 形式组织,以获取高容量。存储系统包括一个或多个卷,卷与卷之间的文件是相互独立的。整个存储系统的总容量等于所有卷的容量之和。一个文件卷包括一个或多个存储服务器,一个卷中的存储服务器之间的文件是一样的。一个文件卷中的服务器会互相备份,且这些服务器之间是负载均衡的。当添加一个存储服务器到一个卷的时候,卷中的文件会自动复制到新的服务器,复制完以后,系统会把新服务器切换到线上,已提供存储服务。当存储容量不足时,你可以添加一个或多个卷来扩展存储容量。一个文件的标识包括两部分:卷名和文件名附录2:FastDFS官方INSTALL文件step 1. 下载安装 libfastcommon地址:https://github.com/happyfish1…step 2. 下载安装 FastDFS 解压:tar xzf FastDFS_v5.08.tar.gzstep 3. 进入FastDFS的目录cd FastDFSstep 4. 执行make:./make.shstep 5. 执行make install./make.sh installstep 6. 修改tracker和storage的配置文件:/etc/fdfs/tracker.conf几个重要的配置:# the tracker server portport=22122# the base path to store data and log filesbase_path=/home/caibh/fdfs# which group to upload file# when store_lookup set to 1, must set store_group to the group namestore_group=group2# HTTP port on this tracker serverhttp.server_port=9270/etc/fdfs/storage.conf几个重要的配置:# the storage server portport=23000# the base path to store data and log filesbase_path=/home/caibh/fdfs# store_path#, based 0, if store_path0 not exists, it’s value is base_path# the paths must be existstore_path0=/home/caibh/fdfs#store_path1=/home/caibh/fdfs2# tracker_server can ocur more than once, and tracker_server format is# “host:port”, host can be hostname or ip address# 在同一台机器上配置tracker和storage时,这里如果是127.0.0.1会报错,所以要配置真正的ip地址。tracker_server=191.8.1.77:22122# the port of the web server on this storage serverhttp.server_port=8888step 7. run server programs启动tracker:/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restartin Linux, you can start fdfs_trackerd as a service:/sbin/service fdfs_trackerd start启动storage:/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restartin Linux, you can start fdfs_storaged as a service:/sbin/service fdfs_storaged startstep 8. 测试修改客户端配置文件:/etc/fdfs/client.conf几个重要的配置:# the base path to store log filesbase_path=/home/caibh/fdfs/client# tracker_server can ocur more than once, and tracker_server format is# “host:port”, host can be hostname or ip addresstracker_server=191.8.1.77:22122#HTTP settingshttp.tracker_server_port=9270run the client test program:/usr/bin/fdfs_test <client_conf_filename> <operation>/usr/bin/fdfs_test1 <client_conf_filename> <operation>例如上传一个图片文件:caibh@pc:$ fdfs_test /etc/fdfs/client.conf upload /develop/fastdfs/test_file/LiuLangDiQiu.jpgThis is FastDFS client test program v5.11Copyright (C) 2008, Happy Fish / YuQingFastDFS may be copied only under the terms of the GNU GeneralPublic License V3, which may be found in the FastDFS source kit.Please visit the FastDFS Home Page http://www.csource.org/ for more detail.[2019-02-19 11:32:30] DEBUG - base_path=/home/caibh/fdfs/client, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0tracker_query_storage_store_list_without_group: server 1. group_name=, ip_addr=191.8.1.77, port=23000group_name=group1, ip_addr=191.8.1.77, port=23000storage_upload_by_filenamegroup_name=group1, remote_filename=M00/00/00/vwgBTVxreM6AD-mcAAEE_qeEI2s285.jpgsource ip address: 191.8.1.77file timestamp=2019-02-19 11:32:30file size=66814file crc32=2810454891example file url: http://191.8.1.77:9270/group1/M00/00/00/vwgBTVxreM6AD-mcAAEE_qeEI2s285.jpgstorage_upload_slave_by_filenamegroup_name=group1, remote_filename=M00/00/00/vwgBTVxreM6AD-mcAAEE_qeEI2s285_big.jpgsource ip address: 191.8.1.77file timestamp=2019-02-19 11:32:30file size=66814file crc32=2810454891example file url: http://191.8.1.77:9270/group1/M00/00/00/vwgBTVxreM6AD-mcAAEE_qeEI2s285_big.jpgstep 9. 查看状态run the monitor program:/usr/bin/fdfs_monitor <client_conf_filename># 如:caibh@pc:$ fdfs_monitor /etc/fdfs/storage.conf[2019-02-19 10:25:09] DEBUG - base_path=/home/caibh/fdfs, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0server_count=1, server_index=0tracker server is 191.8.1.77:22122group count: 1Group 1:group name = group1disk total space = 111868 MBdisk free space = 62228 MBtrunk free space = 0 MBstorage server count = 1active server count = 1storage server port = 23000storage HTTP port = 8888store path count = 1subdir count per path = 256current write server index = 0current trunk file id = 0 Storage 1: id = 191.8.1.77 ip_addr = 191.8.1.77 (191-8-1-77.user.vivozap.com.br) ACTIVE http domain = version = 5.11 join time = 2019-02-19 10:22:53 up time = 2019-02-19 10:22:53 total storage = 111868 MB free storage = 62228 MB upload priority = 10 store_path_count = 1 subdir_count_per_path = 256 storage_port = 23000 storage_http_port = 8888 tracker server config file sample please see conf/tracker.confstorage server config file sample please see conf/storage.confclient config file sample please see conf/client.confItem detailserver common itemsitem nametypedefaultMustbase_pathstring YdisabledbooleanfalseNbind_addrstring Nnetwork_timeoutint30(s)Nmax_connectionsint256Nlog_levelstringinfoNrun_by_groupstring Nrun_by_userstring Nallow_hostsstringNsync_log_buff_intervalint10(s)Nthread_stack_sizestring1MNmemo:base_path is the base path of sub dirs: data and logs. base_path must exist and it’s sub dirs will be automatically created if not exist. $base_path/data: store data files $base_path/logs: store log fileslog_level is the standard log level as syslog, case insensitiveemerg: for emergencyalertcrit: for criticalerrorwarn: for warningnoticeinfodebugallow_hosts can ocur more than once, host can be hostname or ip address,”" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or host[01-08,20-25].domain.com, for example: allow_hosts=10.0.1.[1-15,20] allow_hosts=host[01-08,20-25].domain.comtracker server itemsitem nametypedefaultMustitem nametypedefaultMustportint22000Nstore_lookupint0Nstore_groupstring Nstore_serverint0Nstore_pathint0Ndownload_serverint0Nreserved_storage_spacestring1GBNmemo: the value of store_lookup is:0: round robin (default)1: specify group2: load balance (supported since V1.1)store_group is the name of group to store files.when store_lookup set to 1(specify group), store_group must be set to a specified group name.reserved_storage_space is the reserved storage space for system or other applications. if the free(available) space of any stoargeserver in a group <= reserved_storage_space, no file can be uploadedto this group (since V1.1)bytes unit can be one of follows: G or g for gigabyte(GB) M or m for megabyte(MB) K or k for kilobyte(KB) no unit for byte(B)storage server itemsitem nametypedefaultMustgroup_namestring Ytracker_serverstring Yportint23000Nheart_beat_intervalint30(s)Nstat_report_intervalint300(s)Nsync_wait_msecint100(ms)Nsync_intervalint0(ms)Nsync_start_timestring00:00Nsync_end_timestring23:59Nstore_path_countint1Nstore_path0stringbase_pathNstore_path#string Nsubdir_count_per_pathint256Ncheck_file_duplicateboolean0Nkey_namespacestring Nkeep_aliveboolean0Nsync_binlog_buff_intervalint60sNmemo:tracker_server can ocur more than once, and tracker_server format is “host:port”, host can be hostname or ip address.store_path#, # for digital, based 0check_file_duplicate: when set to true, must work with FastDHT server, more detail please see INSTALL of FastDHT. FastDHT download page: http://code.google.com/p/fast...key_namespace: FastDHT key namespace, can’t be empty when check_file_duplicate is true. the key namespace should short as possible附录3:FastDFS Nginx模块官方INSTALL文件step 1. first install the FastDFS storage server and client library, the FastDFS version should >= 5.11. download address: https://github.com/happyfish1...step 2. install nginx server FastDFS nginx module test passed with nginx 1.15.1, my nginx installed in /usr/local/nginxstep 3. download FastDFS nginx module source package and unpack it, such as:cd /home/yuqinggit clone https://github.com/happyfish100/fastdfsstep 4. enter the nginx source dir, compile and install the module, such as:cd nginx-1.15.1./configure –add-module=/home/yuqing/fastdfs-nginx-module/srcmake; make install注意: before compile, you can change FDFS_OUTPUT_CHUNK_SIZE and FDFS_MOD_CONF_FILENAME macro in the config file as:CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE=‘256*1024’ -DFDFS_MOD_CONF_FILENAME=’"/etc/fdfs/mod_fastdfs.conf"’" step 5. config the nginx config file such as nginx.conf, add the following lines: location /M00 { root /home/yuqing/fastdfs/data; ngx_fastdfs_module; }step 6. 创建软链接 ${fastdfs_base_path}/data/M00 链接到 ${fastdfs_base_path}/data,命令如下:ln -s /home/yuqing/fastdfs/data /home/yuqing/fastdfs/data/M00step 7. change the config file /etc/fdfs/mod_fastdfs.conf, more detail please see itstep 8. 重启nginx:/usr/local/nginx/sbin/nginx -s stop; /usr/local/nginx/sbin/nginx
...