首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >FastDFS图片服务器(分布式文件系统)学习。

FastDFS图片服务器(分布式文件系统)学习。

作者头像
别先生
发布2019-08-13 15:11:27
1.9K0
发布2019-08-13 15:11:27
举报
文章被收录于专栏:别先生别先生

参考:https://blog.csdn.net/hiqingtian/article/details/79413471

https://blog.csdn.net/sinat_40399893/article/details/80548374

1、什么是FastDFS。

  FastDFS是用c语言编写的一款开源的分布式文件系统。FastDFS为互联网量身定制,充分考虑了冗余备份、负载均衡、线性扩容等机制,并注重高可用、高性能等指标,使用FastDFS很容易搭建一套高性能的文件服务器集群提供文件上传、下载等服务。

2、FastDFS架构

  FastDFS架构包括 Tracker server和Storage server。客户端请求Tracker server进行文件上传、下载,通过Tracker server调度最终由Storage server完成文件上传和下载。

  Tracker server作用是负载均衡和调度,通过Tracker server在文件上传时可以根据一些策略找到Storage server提供文件上传服务。可以将tracker称为追踪服务器或调度服务器。

  Storage server作用是文件存储,客户端上传的文件最终存储在Storage服务器上,Storage server没有实现自己的文件系统而是利用操作系统 的文件系统来管理文件。可以将storage称为存储服务器。

如下图:

2.1、Tracker 集群。

  FastDFS集群中的Tracker server可以有多台,Tracker server之间是相互平等关系同时提供服务,Tracker server不存在单点故障。客户端请求Tracker server采用轮询方式,如果请求的tracker无法提供服务则换另一个tracker。

2.2、Storage集群。

  Storage集群采用了分组存储方式。storage集群由一个或多个组构成,集群存储总容量为集群中所有组的存储容量之和。一个组由一台或多台存储服务器组成,组内的Storage server之间是平等关系,不同组的Storage server之间不会相互通信,同组内的Storage server之间会相互连接进行文件同步,从而保证同组内每个storage上的文件完全一致的。一个组的存储容量为该组内存储服务器容量最小的那个,由此可见组内存储服务器的软硬件配置最好是一致的。

  采用分组存储方式的好处是灵活、可控性较强。比如上传文件时,可以由客户端直接指定上传到的组也可以由tracker进行调度选择。一个分组的存储服务器访问压力较大时,可以在该组增加存储服务器来扩充服务能力(纵向扩容)。当系统容量不足时,可以增加组来扩充存储容量(横向扩容)。

2.3、Storage状态收集。

  Storage server会连接集群中所有的Tracker server,定时向他们报告自己的状态,包括磁盘剩余空间、文件同步状况、文件上传下载次数等统计信息。

2.4、文件上传流程。

  客户端上传文件后存储服务器将文件ID返回给客户端,此文件ID用于以后访问该文件的索引信息。文件索引信息包括:组名,虚拟磁盘路径,数据两级目录,文件名。

  a、组名:文件上传后所在的storage组名称,在文件上传成功后有storage服务器返回,需要客户端自行保存。

  b、虚拟磁盘路径:storage配置的虚拟路径,与磁盘选项store_path*对应。如果配置了store_path0则是M00,如果配置了store_path1则是M01,以此类推。

  c、数据两级目录:storage服务器在每个虚拟磁盘路径下创建的两级目录,用于存储数据文件。

  d、文件名:与文件上传时不同。是由存储服务器根据特定信息生成,文件名包含:源存储服务器IP地址、文件创建时间戳、文件大小、随机数和文件拓展名等信息。

2.5、文件下载流程。

  tracker根据请求的文件路径即文件ID 来快速定义文件。

  比如请求下边的文件:

    a、通过组名tracker能够很快的定位到客户端需要访问的存储服务器组是group1,并选择合适的存储服务器提供客户端访问。

    b、存储服务器根据“文件存储虚拟磁盘路径”和“数据文件两级目录”可以很快定位到文件所在目录,并根据文件名找到客户端需要访问的文件。

3、FastDFS+Nginx实现文件服务器。搭建小型的,简单的fastdfs图片服务器,不是高可用的。

3.1、FastDFS--tracker安装。

  3.1.1、tracker和storage使用相同的安装包,下载地址:http://sourceforge.net/projects/FastDFS/https://github.com/happyfish100/FastDFS(推荐)。本教程下载:FastDFS_v5.05.tar.gz

3.1.2、FastDFS安装环境。

    FastDFS是C语言开发,建议在linux上运行,本教程使用Centos6.4作为安装环境。

    安装FastDFS需要先将官网下载的源码进行编译,编译依赖gcc环境,如果没有gcc环境,需要安装gcc:yum install gcc-c++。

  1 [root@localhost ~]# yum install gcc-c++
  2 Loaded plugins: fastestmirror, refresh-packagekit, security
  3 Loading mirror speeds from cached hostfile
  4  * base: mirror.lzu.edu.cn
  5  * extras: mirrors.nju.edu.cn
  6  * updates: mirrors.njupt.edu.cn
  7 Setting up Install Process
  8 Resolving Dependencies
  9 --> Running transaction check
 10 ---> Package gcc-c++.i686 0:4.4.7-23.el6 will be installed
 11 --> Processing Dependency: libstdc++-devel = 4.4.7-23.el6 for package: gcc-c++-4.4.7-23.el6.i686
 12 --> Processing Dependency: libstdc++ = 4.4.7-23.el6 for package: gcc-c++-4.4.7-23.el6.i686
 13 --> Processing Dependency: gcc = 4.4.7-23.el6 for package: gcc-c++-4.4.7-23.el6.i686
 14 --> Running transaction check
 15 ---> Package gcc.i686 0:4.4.7-3.el6 will be updated
 16 ---> Package gcc.i686 0:4.4.7-23.el6 will be an update
 17 --> Processing Dependency: libgomp = 4.4.7-23.el6 for package: gcc-4.4.7-23.el6.i686
 18 --> Processing Dependency: cpp = 4.4.7-23.el6 for package: gcc-4.4.7-23.el6.i686
 19 --> Processing Dependency: libgcc >= 4.4.7-23.el6 for package: gcc-4.4.7-23.el6.i686
 20 ---> Package libstdc++.i686 0:4.4.7-3.el6 will be updated
 21 ---> Package libstdc++.i686 0:4.4.7-23.el6 will be an update
 22 ---> Package libstdc++-devel.i686 0:4.4.7-23.el6 will be installed
 23 --> Running transaction check
 24 ---> Package cpp.i686 0:4.4.7-3.el6 will be updated
 25 ---> Package cpp.i686 0:4.4.7-23.el6 will be an update
 26 ---> Package libgcc.i686 0:4.4.7-3.el6 will be updated
 27 ---> Package libgcc.i686 0:4.4.7-23.el6 will be an update
 28 ---> Package libgomp.i686 0:4.4.7-3.el6 will be updated
 29 ---> Package libgomp.i686 0:4.4.7-23.el6 will be an update
 30 --> Finished Dependency Resolution
 31 
 32 Dependencies Resolved
 33 
 34 ================================================================================================================================================================================================================================
 35  Package                                                     Arch                                             Version                                                    Repository                                        Size
 36 ================================================================================================================================================================================================================================
 37 Installing:
 38  gcc-c++                                                     i686                                             4.4.7-23.el6                                               base                                             4.3 M
 39 Installing for dependencies:
 40  libstdc++-devel                                             i686                                             4.4.7-23.el6                                               base                                             1.6 M
 41 Updating for dependencies:
 42  cpp                                                         i686                                             4.4.7-23.el6                                               base                                             3.4 M
 43  gcc                                                         i686                                             4.4.7-23.el6                                               base                                             8.2 M
 44  libgcc                                                      i686                                             4.4.7-23.el6                                               base                                             115 k
 45  libgomp                                                     i686                                             4.4.7-23.el6                                               base                                             137 k
 46  libstdc++                                                   i686                                             4.4.7-23.el6                                               base                                             303 k
 47 
 48 Transaction Summary
 49 ================================================================================================================================================================================================================================
 50 Install       2 Package(s)
 51 Upgrade       5 Package(s)
 52 
 53 Total download size: 18 M
 54 Is this ok [y/N]: y
 55 Downloading Packages:
 56 (1/7): cpp-4.4.7-23.el6.i686.rpm                                                                                                                                                                         | 3.4 MB     00:00     
 57 (2/7): gcc-4.4.7-23.el6.i686.rpm                                                                                                                                                                         | 8.2 MB     00:04     
 58 (3/7): gcc-c++-4.4.7-23.el6.i686.rpm                                                                                                                                                                     | 4.3 MB     00:02     
 59 (4/7): libgcc-4.4.7-23.el6.i686.rpm                                                                                                                                                                      | 115 kB     00:00     
 60 (5/7): libgomp-4.4.7-23.el6.i686.rpm                                                                                                                                                                     | 137 kB     00:00     
 61 (6/7): libstdc++-4.4.7-23.el6.i686.rpm                                                                                                                                                                   | 303 kB     00:00     
 62 (7/7): libstdc++-devel-4.4.7-23.el6.i686.rpm                                                                                                                                                             | 1.6 MB     00:00     
 63 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 64 Total                                                                                                                                                                                           1.6 MB/s |  18 MB     00:11     
 65 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
 66 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
 67 Importing GPG key 0xC105B9DE:
 68  Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
 69  Package: centos-release-6-4.el6.centos.10.i686 (@anaconda-CentOS-201303020136.i386/6.4)
 70  From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
 71 Is this ok [y/N]: y
 72 Running rpm_check_debug
 73 Running Transaction Test
 74 Transaction Test Succeeded
 75 Running Transaction
 76   Updating   : libgcc-4.4.7-23.el6.i686                                                                                                                                                                                    1/12 
 77   Updating   : libstdc++-4.4.7-23.el6.i686                                                                                                                                                                                 2/12 
 78   Installing : libstdc++-devel-4.4.7-23.el6.i686                                                                                                                                                                           3/12 
 79   Updating   : libgomp-4.4.7-23.el6.i686                                                                                                                                                                                   4/12 
 80   Updating   : cpp-4.4.7-23.el6.i686                                                                                                                                                                                       5/12 
 81   Updating   : gcc-4.4.7-23.el6.i686                                                                                                                                                                                       6/12 
 82   Installing : gcc-c++-4.4.7-23.el6.i686                                                                                                                                                                                   7/12 
 83   Cleanup    : gcc-4.4.7-3.el6.i686                                                                                                                                                                                        8/12 
 84   Cleanup    : libstdc++-4.4.7-3.el6.i686                                                                                                                                                                                  9/12 
 85   Cleanup    : libgcc-4.4.7-3.el6.i686                                                                                                                                                                                    10/12 
 86   Cleanup    : cpp-4.4.7-3.el6.i686                                                                                                                                                                                       11/12 
 87   Cleanup    : libgomp-4.4.7-3.el6.i686                                                                                                                                                                                   12/12 
 88   Verifying  : libgcc-4.4.7-23.el6.i686                                                                                                                                                                                    1/12 
 89   Verifying  : cpp-4.4.7-23.el6.i686                                                                                                                                                                                       2/12 
 90   Verifying  : libgomp-4.4.7-23.el6.i686                                                                                                                                                                                   3/12 
 91   Verifying  : libstdc++-4.4.7-23.el6.i686                                                                                                                                                                                 4/12 
 92   Verifying  : libstdc++-devel-4.4.7-23.el6.i686                                                                                                                                                                           5/12 
 93   Verifying  : gcc-4.4.7-23.el6.i686                                                                                                                                                                                       6/12 
 94   Verifying  : gcc-c++-4.4.7-23.el6.i686                                                                                                                                                                                   7/12 
 95   Verifying  : libstdc++-4.4.7-3.el6.i686                                                                                                                                                                                  8/12 
 96   Verifying  : libgomp-4.4.7-3.el6.i686                                                                                                                                                                                    9/12 
 97   Verifying  : cpp-4.4.7-3.el6.i686                                                                                                                                                                                       10/12 
 98   Verifying  : libgcc-4.4.7-3.el6.i686                                                                                                                                                                                    11/12 
 99   Verifying  : gcc-4.4.7-3.el6.i686                                                                                                                                                                                       12/12 
100 
101 Installed:
102   gcc-c++.i686 0:4.4.7-23.el6                                                                                                                                                                                                   
103 
104 Dependency Installed:
105   libstdc++-devel.i686 0:4.4.7-23.el6                                                                                                                                                                                           
106 
107 Dependency Updated:
108   cpp.i686 0:4.4.7-23.el6                   gcc.i686 0:4.4.7-23.el6                   libgcc.i686 0:4.4.7-23.el6                   libgomp.i686 0:4.4.7-23.el6                   libstdc++.i686 0:4.4.7-23.el6                  
109 
110 Complete!
111 [root@localhost ~]# 

3.1.3、安装libevent。

  FastDFS依赖libevent库,需要安装:yum -y install libevent

 1 [root@localhost ~]# yum -y install libevent
 2 Loaded plugins: fastestmirror, refresh-packagekit, security
 3 Loading mirror speeds from cached hostfile
 4  * base: mirror.lzu.edu.cn
 5  * extras: mirrors.nju.edu.cn
 6  * updates: mirrors.njupt.edu.cn
 7 Setting up Install Process
 8 Resolving Dependencies
 9 --> Running transaction check
10 ---> Package libevent.i686 0:1.4.13-4.el6 will be installed
11 --> Finished Dependency Resolution
12 
13 Dependencies Resolved
14 
15 ================================================================================================================================================================================================================================
16  Package                                                Arch                                               Version                                                     Repository                                          Size
17 ================================================================================================================================================================================================================================
18 Installing:
19  libevent                                               i686                                               1.4.13-4.el6                                                base                                                67 k
20 
21 Transaction Summary
22 ================================================================================================================================================================================================================================
23 Install       1 Package(s)
24 
25 Total download size: 67 k
26 Installed size: 226 k
27 Downloading Packages:
28 libevent-1.4.13-4.el6.i686.rpm                                                                                                                                                                           |  67 kB     00:00     
29 Running rpm_check_debug
30 Running Transaction Test
31 Transaction Test Succeeded
32 Running Transaction
33   Installing : libevent-1.4.13-4.el6.i686                                                                                                                                                                                   1/1 
34   Verifying  : libevent-1.4.13-4.el6.i686                                                                                                                                                                                   1/1 
35 
36 Installed:
37   libevent.i686 0:1.4.13-4.el6                                                                                                                                                                                                  
38 
39 Complete!
40 [root@localhost ~]#

3.1.4、安装libfastcommon。

libfastcommon是FastDFS官方提供的,libfastcommon包含了FastDFS运行所需要的一些基础库。
将libfastcommonV1.0.7.tar.gz拷贝至/usr/local/下
cd /usr/local
tar -zxvf libfastcommonV1.0.7.tar.gz
cd libfastcommon-1.0.7
./make.sh
./make.sh install

注意:libfastcommon安装好后会自动将库文件拷贝至/usr/lib64下,由于FastDFS程序引用usr/lib目录所以需要将/usr/lib64下的库文件拷贝至/usr/lib下。

要拷贝的文件如下:

root@localhost local# tar -zxvf libfastcommonV1.0.7.tar.gz

root@localhost libfastcommon-1.0.7# ./make.sh

root@localhost libfastcommon-1.0.7# ./make.sh install

root@localhost lib64# cp libfastcommon.so /usr/lib

  1 [root@localhost ~]# cd /usr/local/
  2 [root@localhost local]# ls
  3 bin  etc  games  include  lib  libexec  libfastcommonV1.0.7.tar.gz  sbin  share  src
  4 [root@localhost local]# tar -zxvf libfastcommonV1.0.7.tar.gz 
  5 libfastcommon-1.0.7/
  6 libfastcommon-1.0.7/HISTORY
  7 libfastcommon-1.0.7/INSTALL
  8 libfastcommon-1.0.7/README
  9 libfastcommon-1.0.7/libfastcommon.spec
 10 libfastcommon-1.0.7/make.sh
 11 libfastcommon-1.0.7/src/
 12 libfastcommon-1.0.7/src/Makefile.in
 13 libfastcommon-1.0.7/src/_os_bits.h
 14 libfastcommon-1.0.7/src/avl_tree.c
 15 libfastcommon-1.0.7/src/avl_tree.h
 16 libfastcommon-1.0.7/src/base64.c
 17 libfastcommon-1.0.7/src/base64.h
 18 libfastcommon-1.0.7/src/chain.c
 19 libfastcommon-1.0.7/src/chain.h
 20 libfastcommon-1.0.7/src/common_define.h
 21 libfastcommon-1.0.7/src/connection_pool.c
 22 libfastcommon-1.0.7/src/connection_pool.h
 23 libfastcommon-1.0.7/src/fast_link_library.sh
 24 libfastcommon-1.0.7/src/fast_mblock.c
 25 libfastcommon-1.0.7/src/fast_mblock.h
 26 libfastcommon-1.0.7/src/fast_task_queue.c
 27 libfastcommon-1.0.7/src/fast_task_queue.h
 28 libfastcommon-1.0.7/src/fast_timer.c
 29 libfastcommon-1.0.7/src/fast_timer.h
 30 libfastcommon-1.0.7/src/hash.c
 31 libfastcommon-1.0.7/src/hash.h
 32 libfastcommon-1.0.7/src/http_func.c
 33 libfastcommon-1.0.7/src/http_func.h
 34 libfastcommon-1.0.7/src/ini_file_reader.c
 35 libfastcommon-1.0.7/src/ini_file_reader.h
 36 libfastcommon-1.0.7/src/io_opt.c
 37 libfastcommon-1.0.7/src/io_opt.h
 38 libfastcommon-1.0.7/src/ioevent.c
 39 libfastcommon-1.0.7/src/ioevent.h
 40 libfastcommon-1.0.7/src/ioevent_loop.c
 41 libfastcommon-1.0.7/src/ioevent_loop.h
 42 libfastcommon-1.0.7/src/local_ip_func.c
 43 libfastcommon-1.0.7/src/local_ip_func.h
 44 libfastcommon-1.0.7/src/logger.c
 45 libfastcommon-1.0.7/src/logger.h
 46 libfastcommon-1.0.7/src/md5.c
 47 libfastcommon-1.0.7/src/md5.h
 48 libfastcommon-1.0.7/src/process_ctrl.c
 49 libfastcommon-1.0.7/src/process_ctrl.h
 50 libfastcommon-1.0.7/src/pthread_func.c
 51 libfastcommon-1.0.7/src/pthread_func.h
 52 libfastcommon-1.0.7/src/pthread_pool.c
 53 libfastcommon-1.0.7/src/pthread_pool.h
 54 libfastcommon-1.0.7/src/sched_thread.c
 55 libfastcommon-1.0.7/src/sched_thread.h
 56 libfastcommon-1.0.7/src/shared_func.c
 57 libfastcommon-1.0.7/src/shared_func.h
 58 libfastcommon-1.0.7/src/sockopt.c
 59 libfastcommon-1.0.7/src/sockopt.h
 60 [root@localhost local]# cd libfastcommon
 61 libfastcommon-1.0.7/        libfastcommonV1.0.7.tar.gz  
 62 [root@localhost local]# cd libfastcommon-1.0.7/
 63 [root@localhost libfastcommon-1.0.7]# ls
 64 HISTORY  INSTALL  libfastcommon.spec  make.sh  README  src
 65 [root@localhost libfastcommon-1.0.7]# ./make.sh 
 66 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o hash.lo hash.c  
 67 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o chain.lo chain.c  
 68 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o shared_func.lo shared_func.c  
 69 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o ini_file_reader.lo ini_file_reader.c  
 70 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o logger.lo logger.c  
 71 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o sockopt.lo sockopt.c  
 72 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o base64.lo base64.c  
 73 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o sched_thread.lo sched_thread.c  
 74 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o http_func.lo http_func.c  
 75 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o md5.lo md5.c  
 76 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o pthread_func.lo pthread_func.c  
 77 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o local_ip_func.lo local_ip_func.c  
 78 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o avl_tree.lo avl_tree.c  
 79 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o ioevent.lo ioevent.c  
 80 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o ioevent_loop.lo ioevent_loop.c  
 81 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o fast_task_queue.lo fast_task_queue.c  
 82 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o fast_timer.lo fast_timer.c  
 83 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o process_ctrl.lo process_ctrl.c  
 84 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o fast_mblock.lo fast_mblock.c  
 85 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o connection_pool.lo connection_pool.c  
 86 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o libfastcommon.so  -shared hash.lo chain.lo shared_func.lo ini_file_reader.lo logger.lo sockopt.lo base64.lo sched_thread.lo http_func.lo md5.lo pthread_func.lo local_ip_func.lo avl_tree.lo ioevent.lo ioevent_loop.lo fast_task_queue.lo fast_timer.lo process_ctrl.lo fast_mblock.lo connection_pool.lo
 87 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o hash.o hash.c  
 88 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o chain.o chain.c  
 89 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o shared_func.o shared_func.c  
 90 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ini_file_reader.o ini_file_reader.c  
 91 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o logger.o logger.c  
 92 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o sockopt.o sockopt.c  
 93 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o base64.o base64.c  
 94 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o sched_thread.o sched_thread.c  
 95 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o http_func.o http_func.c  
 96 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o md5.o md5.c  
 97 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o pthread_func.o pthread_func.c  
 98 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o local_ip_func.o local_ip_func.c  
 99 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o avl_tree.o avl_tree.c  
100 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ioevent.o ioevent.c  
101 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ioevent_loop.o ioevent_loop.c  
102 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o fast_task_queue.o fast_task_queue.c  
103 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o fast_timer.o fast_timer.c  
104 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o process_ctrl.o process_ctrl.c  
105 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o fast_mblock.o fast_mblock.c  
106 cc -Wall -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o connection_pool.o connection_pool.c  
107 ar rcs libfastcommon.a hash.o
108 [root@localhost libfastcommon-1.0.7]# ./make.sh install
109 mkdir -p /usr/lib64
110 install -m 755 libfastcommon.so /usr/lib64
111 mkdir -p /usr/include/fastcommon
112 install -m 644 common_define.h hash.h chain.h logger.h base64.h shared_func.h pthread_func.h ini_file_reader.h _os_bits.h sockopt.h sched_thread.h http_func.h md5.h local_ip_func.h avl_tree.h ioevent.h ioevent_loop.h fast_task_queue.h fast_timer.h process_ctrl.h fast_mblock.h connection_pool.h /usr/include/fastcommon
113 [root@localhost libfastcommon-1.0.7]# cd /usr/lib64/
114 [root@localhost lib64]# ls
115 libfastcommon.so
116 [root@localhost lib64]# ll
117 total 256
118 -rwxr-xr-x. 1 root root 260053 Aug  8 02:24 libfastcommon.so
119 [root@localhost lib64]# cp libfastcommon.so /usr/lib
120 lib/     lib64/   libexec/ 
121 [root@localhost lib64]# cp libfastcommon.so /usr/lib
122 lib/     lib64/   libexec/ 
123 [root@localhost lib64]# cp libfastcommon.so /usr/lib
124 [root@localhost lib64]# ls
125 libfastcommon.so
126 [root@localhost lib64]# ll
127 total 256
128 -rwxr-xr-x. 1 root root 260053 Aug  8 02:24 libfastcommon.so
129 [root@localhost lib64]# 

3.1.5、tracker编译安装

  将FastDFS_v5.05.tar.gz拷贝至/usr/local/下

  tar -zxvf FastDFS_v5.05.tar.gz

  cd FastDFS

  ./make.sh

  ./make.sh install

  安装成功将安装目录下的conf下的文件拷贝到/etc/fdfs/下。

root@localhost local# tar -zxvf FastDFS_v5.05.tar.gz

root@localhost local# cd FastDFS

root@localhost FastDFS# ./make.sh

root@localhost FastDFS# ./make.sh install

  1 [root@localhost ~]# cd /usr/local/
  2 [root@localhost local]# ls
  3 bin  etc  FastDFS_v5.05.tar.gz  games  include  lib  libexec  libfastcommon-1.0.7  libfastcommonV1.0.7.tar.gz  sbin  share  src
  4 [root@localhost local]# tar -zxvf FastDFS_v5.05.tar.gz 
  5 FastDFS/
  6 FastDFS/tracker/
  7 FastDFS/tracker/tracker_global.c
  8 FastDFS/tracker/tracker_http_check.c
  9 FastDFS/tracker/tracker_http_check.h
 10 FastDFS/tracker/tracker_types.h
 11 FastDFS/tracker/tracker_service.h
 12 FastDFS/tracker/tracker_relationship.h
 13 FastDFS/tracker/tracker_service.c
 14 FastDFS/tracker/tracker_dump.h
 15 FastDFS/tracker/tracker_func.c
 16 FastDFS/tracker/tracker_dump.c
 17 FastDFS/tracker/tracker_relationship.c
 18 FastDFS/tracker/tracker_proto.c
 19 FastDFS/tracker/tracker_nio.h
 20 FastDFS/tracker/tracker_mem.c
 21 FastDFS/tracker/tracker_mem.h
 22 FastDFS/tracker/fdfs_shared_func.c
 23 FastDFS/tracker/tracker_global.h
 24 FastDFS/tracker/tracker_func.h
 25 FastDFS/tracker/tracker_status.h
 26 FastDFS/tracker/fdfs_shared_func.h
 27 FastDFS/tracker/fdfs_trackerd.c
 28 FastDFS/tracker/tracker_status.c
 29 FastDFS/tracker/Makefile.in
 30 FastDFS/tracker/tracker_proto.h
 31 FastDFS/tracker/tracker_nio.c
 32 FastDFS/make.sh
 33 FastDFS/common/
 34 FastDFS/common/linux_stack_trace.h
 35 FastDFS/common/mime_file_parser.h
 36 FastDFS/common/linux_stack_trace.c
 37 FastDFS/common/mime_file_parser.c
 38 FastDFS/common/fdfs_http_shared.c
 39 FastDFS/common/fdfs_global.h
 40 FastDFS/common/fdfs_global.c
 41 FastDFS/common/fdfs_define.h
 42 FastDFS/common/_os_bits.h
 43 FastDFS/common/fdfs_http_shared.h
 44 FastDFS/common/Makefile
 45 FastDFS/INSTALL
 46 FastDFS/test/
 47 FastDFS/test/test_download.sh
 48 FastDFS/test/dfs_func.h
 49 FastDFS/test/test_upload.c
 50 FastDFS/test/test_delete.sh
 51 FastDFS/test/dfs_func.c
 52 FastDFS/test/test_types.h
 53 FastDFS/test/test_delete.c
 54 FastDFS/test/common_func.h
 55 FastDFS/test/common_func.c
 56 FastDFS/test/dfs_func_pc.c
 57 FastDFS/test/gen_files.c
 58 FastDFS/test/combine_result.c
 59 FastDFS/test/test_download.c
 60 FastDFS/test/test_upload.sh
 61 FastDFS/test/Makefile
 62 FastDFS/conf/
 63 FastDFS/conf/http.conf
 64 FastDFS/conf/client.conf
 65 FastDFS/conf/anti-steal.jpg
 66 FastDFS/conf/storage_ids.conf
 67 FastDFS/conf/mime.types
 68 FastDFS/conf/tracker.conf
 69 FastDFS/conf/storage.conf
 70 FastDFS/fastdfs.spec
 71 FastDFS/client/
 72 FastDFS/client/fdfs_upload_file.c
 73 FastDFS/client/fdfs_delete_file.c
 74 FastDFS/client/fdfs_client.h
 75 FastDFS/client/fdfs_upload_appender.c
 76 FastDFS/client/fdfs_appender_test1.c
 77 FastDFS/client/storage_client.h
 78 FastDFS/client/tracker_client.h
 79 FastDFS/client/client_global.c
 80 FastDFS/client/test/
 81 FastDFS/client/test/fdfs_monitor.c
 82 FastDFS/client/test/fdfs_test.c
 83 FastDFS/client/test/fdfs_test1.c
 84 FastDFS/client/test/Makefile.in
 85 FastDFS/client/storage_client1.h
 86 FastDFS/client/fdfs_monitor.c
 87 FastDFS/client/fdfs_file_info.c
 88 FastDFS/client/storage_client.c
 89 FastDFS/client/client_func.c
 90 FastDFS/client/fdfs_appender_test.c
 91 FastDFS/client/fdfs_append_file.c
 92 FastDFS/client/fdfs_link_library.sh.in
 93 FastDFS/client/fdfs_test.c
 94 FastDFS/client/fdfs_download_file.c
 95 FastDFS/client/tracker_client.c
 96 FastDFS/client/fdfs_test1.c
 97 FastDFS/client/fdfs_crc32.c
 98 FastDFS/client/Makefile.in
 99 FastDFS/client/client_func.h
100 FastDFS/client/client_global.h
101 FastDFS/init.d/
102 FastDFS/init.d/fdfs_trackerd
103 FastDFS/init.d/fdfs_storaged
104 FastDFS/stop.sh
105 FastDFS/README.md
106 FastDFS/php_client/
107 FastDFS/php_client/fastdfs_appender_test1.php
108 FastDFS/php_client/fastdfs_client.ini
109 FastDFS/php_client/fastdfs_callback_test.php
110 FastDFS/php_client/fastdfs_client.spec.in
111 FastDFS/php_client/fastdfs_test.php
112 FastDFS/php_client/fastdfs_test1.php
113 FastDFS/php_client/fastdfs_test_slave.php
114 FastDFS/php_client/README
115 FastDFS/php_client/config.m4
116 FastDFS/php_client/fastdfs_client.c
117 FastDFS/php_client/fastdfs_client.h
118 FastDFS/php_client/fastdfs_appender_test.php
119 FastDFS/restart.sh
120 FastDFS/COPYING-3_0.txt
121 FastDFS/HISTORY
122 FastDFS/storage/
123 FastDFS/storage/tracker_client_thread.c
124 FastDFS/storage/storage_func.c
125 FastDFS/storage/storage_service.c
126 FastDFS/storage/storage_ip_changed_dealer.h
127 FastDFS/storage/fdht_client/
128 FastDFS/storage/fdht_client/fdht_define.h
129 FastDFS/storage/fdht_client/fdht_global.h
130 FastDFS/storage/fdht_client/fdht_proto.c
131 FastDFS/storage/fdht_client/fdht_func.c
132 FastDFS/storage/fdht_client/fdht_proto_types.h
133 FastDFS/storage/fdht_client/fdht_func.h
134 FastDFS/storage/fdht_client/fdht_client.c
135 FastDFS/storage/fdht_client/fdht_global.c
136 FastDFS/storage/fdht_client/fdht_types.h
137 FastDFS/storage/fdht_client/fdht_proto.h
138 FastDFS/storage/fdht_client/fdht_client.h
139 FastDFS/storage/storage_sync.h
140 FastDFS/storage/storage_disk_recovery.c
141 FastDFS/storage/storage_func.h
142 FastDFS/storage/storage_global.c
143 FastDFS/storage/storage_dump.h
144 FastDFS/storage/storage_dump.c
145 FastDFS/storage/storage_dio.c
146 FastDFS/storage/storage_param_getter.c
147 FastDFS/storage/storage_nio.c
148 FastDFS/storage/trunk_mgr/
149 FastDFS/storage/trunk_mgr/trunk_sync.h
150 FastDFS/storage/trunk_mgr/trunk_sync.c
151 FastDFS/storage/trunk_mgr/trunk_free_block_checker.c
152 FastDFS/storage/trunk_mgr/trunk_free_block_checker.h
153 FastDFS/storage/trunk_mgr/trunk_mem.c
154 FastDFS/storage/trunk_mgr/trunk_shared.c
155 FastDFS/storage/trunk_mgr/trunk_mem.h
156 FastDFS/storage/trunk_mgr/trunk_client.c
157 FastDFS/storage/trunk_mgr/trunk_shared.h
158 FastDFS/storage/trunk_mgr/trunk_client.h
159 FastDFS/storage/storage_param_getter.h
160 FastDFS/storage/storage_sync.c
161 FastDFS/storage/storage_service.h
162 FastDFS/storage/storage_dio.h
163 FastDFS/storage/storage_nio.h
164 FastDFS/storage/storage_ip_changed_dealer.c
165 FastDFS/storage/fdfs_storaged.c
166 FastDFS/storage/storage_disk_recovery.h
167 FastDFS/storage/Makefile.in
168 FastDFS/storage/tracker_client_thread.h
169 FastDFS/storage/storage_global.h
170 [root@localhost local]# cd FastDFS
171 [root@localhost FastDFS]# ls
172 client  common  conf  COPYING-3_0.txt  fastdfs.spec  HISTORY  init.d  INSTALL  make.sh  php_client  README.md  restart.sh  stop.sh  storage  test  tracker
173 [root@localhost FastDFS]# ll
174 total 132
175 drwxr-xr-x. 3 8980 users  4096 Dec  1  2014 client
176 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 common
177 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 conf
178 -rw-r--r--. 1 8980 users 35067 Dec  1  2014 COPYING-3_0.txt
179 -rw-r--r--. 1 8980 users  2802 Dec  1  2014 fastdfs.spec
180 -rw-r--r--. 1 8980 users 31386 Dec  1  2014 HISTORY
181 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 init.d
182 -rw-r--r--. 1 8980 users  7755 Dec  1  2014 INSTALL
183 -rwxr-xr-x. 1 8980 users  5813 Dec  1  2014 make.sh
184 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 php_client
185 -rw-r--r--. 1 8980 users  2380 Dec  1  2014 README.md
186 -rwxr-xr-x. 1 8980 users  1768 Dec  1  2014 restart.sh
187 -rwxr-xr-x. 1 8980 users  1680 Dec  1  2014 stop.sh
188 drwxr-xr-x. 4 8980 users  4096 Dec  1  2014 storage
189 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 test
190 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 tracker
191 [root@localhost FastDFS]# ./make.sh 
192 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ../common/fdfs_global.o ../common/fdfs_global.c  -I../common -I/usr/include/fastcommon
193 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_proto.o tracker_proto.c  -I../common -I/usr/include/fastcommon
194 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_mem.o tracker_mem.c  -I../common -I/usr/include/fastcommon
195 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_service.o tracker_service.c  -I../common -I/usr/include/fastcommon
196 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_status.o tracker_status.c  -I../common -I/usr/include/fastcommon
197 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_global.o tracker_global.c  -I../common -I/usr/include/fastcommon
198 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_func.o tracker_func.c  -I../common -I/usr/include/fastcommon
199 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o fdfs_shared_func.o fdfs_shared_func.c  -I../common -I/usr/include/fastcommon
200 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_nio.o tracker_nio.c  -I../common -I/usr/include/fastcommon
201 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_relationship.o tracker_relationship.c  -I../common -I/usr/include/fastcommon
202 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_dump.o tracker_dump.c  -I../common -I/usr/include/fastcommon
203 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ../common/linux_stack_trace.o ../common/linux_stack_trace.c  -I../common -I/usr/include/fastcommon
204 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_trackerd fdfs_trackerd.c  ../common/fdfs_global.o tracker_proto.o tracker_mem.o tracker_service.o tracker_status.o tracker_global.o tracker_func.o fdfs_shared_func.o tracker_nio.o tracker_relationship.o tracker_dump.o ../common/linux_stack_trace.o -L/usr/local/lib  -lpthread -ldl -rdynamic -lfastcommon -I../common -I/usr/include/fastcommon
205 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o tracker_client_thread.o tracker_client_thread.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
206 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_global.o storage_global.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
207 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_func.o storage_func.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
208 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_service.o storage_service.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
209 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_sync.o storage_sync.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
210 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_nio.o storage_nio.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
211 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_dio.o storage_dio.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
212 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_ip_changed_dealer.o storage_ip_changed_dealer.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
213 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_param_getter.o storage_param_getter.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
214 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_disk_recovery.o storage_disk_recovery.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
215 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o trunk_mgr/trunk_mem.o trunk_mgr/trunk_mem.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
216 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o trunk_mgr/trunk_shared.o trunk_mgr/trunk_shared.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
217 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o trunk_mgr/trunk_sync.o trunk_mgr/trunk_sync.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
218 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o trunk_mgr/trunk_client.o trunk_mgr/trunk_client.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
219 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o trunk_mgr/trunk_free_block_checker.o trunk_mgr/trunk_free_block_checker.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
220 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ../client/client_global.o ../client/client_global.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
221 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ../client/tracker_client.o ../client/tracker_client.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
222 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ../client/storage_client.o ../client/storage_client.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
223 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ../client/client_func.o ../client/client_func.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
224 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o fdht_client/fdht_proto.o fdht_client/fdht_proto.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
225 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o fdht_client/fdht_client.o fdht_client/fdht_client.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
226 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o fdht_client/fdht_func.o fdht_client/fdht_func.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
227 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o fdht_client/fdht_global.o fdht_client/fdht_global.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
228 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o storage_dump.o storage_dump.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
229 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_storaged fdfs_storaged.c  ../common/fdfs_global.o ../tracker/fdfs_shared_func.o ../tracker/tracker_proto.o tracker_client_thread.o storage_global.o storage_func.o storage_service.o storage_sync.o storage_nio.o storage_dio.o storage_ip_changed_dealer.o storage_param_getter.o storage_disk_recovery.o trunk_mgr/trunk_mem.o trunk_mgr/trunk_shared.o trunk_mgr/trunk_sync.o trunk_mgr/trunk_client.o trunk_mgr/trunk_free_block_checker.o ../client/client_global.o ../client/tracker_client.o ../client/storage_client.o ../client/client_func.o fdht_client/fdht_proto.o fdht_client/fdht_client.o fdht_client/fdht_func.o fdht_client/fdht_global.o storage_dump.o ../common/linux_stack_trace.o -L/usr/local/lib  -lpthread -ldl -rdynamic -lfastcommon -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
230 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ../common/fdfs_http_shared.o ../common/fdfs_http_shared.c  -I../common -I../tracker -I/usr/include/fastcommon
231 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -o ../common/mime_file_parser.o ../common/mime_file_parser.c  -I../common -I../tracker -I/usr/include/fastcommon
232 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o ../common/fdfs_global.lo ../common/fdfs_global.c  -I../common -I../tracker -I/usr/include/fastcommon
233 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o ../common/fdfs_http_shared.lo ../common/fdfs_http_shared.c  -I../common -I../tracker -I/usr/include/fastcommon
234 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o ../common/mime_file_parser.lo ../common/mime_file_parser.c  -I../common -I../tracker -I/usr/include/fastcommon
235 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o ../tracker/tracker_proto.lo ../tracker/tracker_proto.c  -I../common -I../tracker -I/usr/include/fastcommon
236 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o ../tracker/fdfs_shared_func.lo ../tracker/fdfs_shared_func.c  -I../common -I../tracker -I/usr/include/fastcommon
237 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o ../storage/trunk_mgr/trunk_shared.lo ../storage/trunk_mgr/trunk_shared.c  -I../common -I../tracker -I/usr/include/fastcommon
238 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o tracker_client.lo tracker_client.c  -I../common -I../tracker -I/usr/include/fastcommon
239 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o client_func.lo client_func.c  -I../common -I../tracker -I/usr/include/fastcommon
240 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o client_global.lo client_global.c  -I../common -I../tracker -I/usr/include/fastcommon
241 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -c -fPIC -o storage_client.lo storage_client.c  -I../common -I../tracker -I/usr/include/fastcommon
242 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_monitor fdfs_monitor.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
243 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_test fdfs_test.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
244 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_test1 fdfs_test1.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
245 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_crc32 fdfs_crc32.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
246 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_upload_file fdfs_upload_file.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
247 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_download_file fdfs_download_file.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
248 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_delete_file fdfs_delete_file.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
249 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_file_info fdfs_file_info.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
250 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_appender_test fdfs_appender_test.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
251 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_appender_test1 fdfs_appender_test1.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
252 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_append_file fdfs_append_file.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
253 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_upload_appender fdfs_upload_appender.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
254 ar cru libfdfsclient.a  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o
255 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o libfdfsclient.so  -shared ../common/fdfs_global.lo ../common/fdfs_http_shared.lo ../common/mime_file_parser.lo ../tracker/tracker_proto.lo ../tracker/fdfs_shared_func.lo ../storage/trunk_mgr/trunk_shared.lo tracker_client.lo client_func.lo client_global.lo storage_client.lo -lpthread -ldl -rdynamic -lfastcommon
256 [root@localhost FastDFS]# ./make.sh install
257 mkdir -p /usr/bin
258 mkdir -p /etc/fdfs
259 cp -f fdfs_trackerd /usr/bin
260 if [ ! -f /etc/fdfs/tracker.conf.sample ]; then cp -f ../conf/tracker.conf /etc/fdfs/tracker.conf.sample; fi
261 mkdir -p /usr/bin
262 mkdir -p /etc/fdfs
263 cp -f fdfs_storaged  /usr/bin
264 if [ ! -f /etc/fdfs/storage.conf.sample ]; then cp -f ../conf/storage.conf /etc/fdfs/storage.conf.sample; fi
265 mkdir -p /usr/bin
266 mkdir -p /etc/fdfs
267 mkdir -p /usr/lib64
268 cp -f fdfs_monitor fdfs_test fdfs_test1 fdfs_crc32 fdfs_upload_file fdfs_download_file fdfs_delete_file fdfs_file_info fdfs_appender_test fdfs_appender_test1 fdfs_append_file fdfs_upload_appender /usr/bin
269 if [ 0 -eq 1 ]; then cp -f libfdfsclient.a /usr/lib64; fi
270 if [ 1 -eq 1 ]; then cp -f libfdfsclient.so /usr/lib64; fi
271 mkdir -p /usr/include/fastdfs
272 cp -f ../common/fdfs_define.h ../common/fdfs_global.h ../common/mime_file_parser.h ../common/fdfs_http_shared.h ../tracker/tracker_types.h ../tracker/tracker_proto.h ../tracker/fdfs_shared_func.h ../storage/trunk_mgr/trunk_shared.h tracker_client.h storage_client.h storage_client1.h client_func.h client_global.h fdfs_client.h /usr/include/fastdfs
273 if [ ! -f /etc/fdfs/client.conf.sample ]; then cp -f ../conf/client.conf /etc/fdfs/client.conf.sample; fi
274 [root@localhost FastDFS]#

安装成功将安装目录下的conf下的文件拷贝到/etc/fdfs/下。

 1 [root@localhost FastDFS]# cd conf/
 2 [root@localhost conf]# ls
 3 anti-steal.jpg  client.conf  http.conf  mime.types  storage.conf  storage_ids.conf  tracker.conf
 4 [root@localhost conf]# ll
 5 total 84
 6 -rw-r--r--. 1 8980 users 23981 Dec  1  2014 anti-steal.jpg
 7 -rw-r--r--. 1 8980 users  1461 Dec  1  2014 client.conf
 8 -rw-r--r--. 1 8980 users   858 Dec  1  2014 http.conf
 9 -rw-r--r--. 1 8980 users 31172 Dec  1  2014 mime.types
10 -rw-r--r--. 1 8980 users  7829 Dec  1  2014 storage.conf
11 -rw-r--r--. 1 8980 users   105 Dec  1  2014 storage_ids.conf
12 -rw-r--r--. 1 8980 users  7102 Dec  1  2014 tracker.conf
13 [root@localhost conf]# cp * /etc/fdfs/
14 [root@localhost conf]# cd /etc/fdfs/
15 [root@localhost fdfs]# ls
16 anti-steal.jpg  client.conf  client.conf.sample  http.conf  mime.types  storage.conf  storage.conf.sample  storage_ids.conf  tracker.conf  tracker.conf.sample
17 [root@localhost fdfs]# ll
18 total 104
19 -rw-r--r--. 1 root root 23981 Aug  8 02:31 anti-steal.jpg
20 -rw-r--r--. 1 root root  1461 Aug  8 02:31 client.conf
21 -rw-r--r--. 1 root root  1461 Aug  8 02:29 client.conf.sample
22 -rw-r--r--. 1 root root   858 Aug  8 02:31 http.conf
23 -rw-r--r--. 1 root root 31172 Aug  8 02:31 mime.types
24 -rw-r--r--. 1 root root  7829 Aug  8 02:31 storage.conf
25 -rw-r--r--. 1 root root  7829 Aug  8 02:29 storage.conf.sample
26 -rw-r--r--. 1 root root   105 Aug  8 02:31 storage_ids.conf
27 -rw-r--r--. 1 root root  7102 Aug  8 02:31 tracker.conf
28 -rw-r--r--. 1 root root  7102 Aug  8 02:29 tracker.conf.sample
29 [root@localhost fdfs]#

3.1.6、配置,安装成功后进入/etc/fdfs目录:

拷贝一份新的tracker配置文件:

cp tracker.conf.sample tracker.conf

修改tracker.conf

vi tracker.conf

  base_path=/home/yuqing/FastDFS

改为:

  base_path=/home/FastDFS

root@localhost fdfs# vim tracker.conf

注意:在/home目录下面创建FastDFS目录哟。不然下面启动报错。

  1 4.1tracker.conf
  2 
  3 1 基本配置
  4 disable
  5 #func:配置是否生效
  6 #valu:true、false
  7 disable=false
  8 bind_addr
  9 #func:绑定IP
 10 #valu:IP地址
 11 bind_addr=192.168.6.102
 12 port
 13 #func:服务端口
 14 #valu:端口整数值
 15 port=22122
 16 connect_timeout
 17 #func:连接超时
 18 #valu:秒单位正整数值
 19 connect_timeout=30
 20 network_timeout
 21 #func:网络超时
 22 #valu:秒单位正整数值
 23 network_timeout=60
 24 base_path
 25 #func:Tracker数据/日志目录地址
 26 #valu:路径
 27 base_path=/home/michael/fdfs/base4tracker
 28 max_connections
 29 #func:最大连接数
 30 #valu:正整数值
 31 max_connections=256
 32 work_threads
 33 #func:线程数,通常设置CPU数
 34 #valu:正整数值
 35 work_threads=4
 36 store_lookup
 37 #func:上传文件的选组方式。
 38 #valu:0、1或2。
 39 # 0:表示轮询
 40 # 1:表示指定组
 41 # 2:表示存储负载均衡(选择剩余空间最大的组)
 42 store_lookup=2
 43 store_group
 44 #func:指定上传的组,如果在应用层指定了具体的组,那么这个参数将不会起效。另外如果store_lookup如果是0或2,则此参数无效。
 45 #valu:group1等
 46 store_group=group1
 47 store_server
 48 #func:上传服务器的选择方式。(一个文件被上传后,这个storage server就相当于这个文件的storage server源,会对同组的storage server推送这个文件达到同步效果)
 49 #valu:0、1或2
 50 # 0: 轮询方式(默认)
 51 # 1: 根据ip 地址进行排序选择第一个服务器(IP地址最小者)
 52 # 2: 根据优先级进行排序(上传优先级由storage server来设置,参数名为upload_priority),优先级值越小优先级越高。
 53 store_server=0
 54 store_path
 55 #func:上传路径的选择方式。storage server可以有多个存放文件的base path(可以理解为多个磁盘)。
 56 #valu:
 57 # 0: 轮流方式,多个目录依次存放文件
 58 # 2: 存储负载均衡。选择剩余空间最大的目录存放文件(注意:剩余磁盘空间是动态的,因此存储到的目录或磁盘可能也是变化的)
 59 store_path=0
 60 download_server
 61 #func:下载服务器的选择方式。
 62 #valu:
 63 # 0:轮询(默认)
 64 # 1:IP最小者
 65 # 2:优先级排序(值最小的,优先级最高。)
 66 download_server=0
 67 reserved_storage_space
 68 #func:保留空间值。如果某个组中的某个服务器的剩余自由空间小于设定值,则文件不会被上传到这个组。
 69 #valu:
 70 # G or g for gigabyte
 71 # M or m for megabyte
 72 # K or k for kilobyte
 73 reserved_storage_space=1GB
 74 log_level
 75 #func:日志级别
 76 #valu:
 77 # emerg for emergency
 78 # alert
 79 # crit for critical
 80 # error
 81 # warn for warning
 82 # notice
 83 # info for information
 84 # debug for debugging
 85 log_level=info
 86 run_by_group / run_by_user
 87 #func:指定运行该程序的用户组
 88 #valu:用户组名或空
 89 run_by_group=
 90 
 91 #func:
 92 #valu:
 93 run_by_user=
 94 allow_hosts
 95 #func:可以连接到tracker server的ip范围。可设定多个值。
 96 #valu
 97 allow_hosts=
 98 check_active_interval
 99 #func:检测 storage server 存活的时间隔,单位为秒。
100 #      storage server定期向tracker server 发心跳,
101 #      如果tracker server在一个check_active_interval内还没有收到storage server的一次心跳,
102 #      那边将认为该storage server已经下线。所以本参数值必须大于storage server配置的心跳时间间隔。
103 #      通常配置为storage server心跳时间间隔的2倍或3倍。
104 check_active_interval=120
105 thread_stack_size
106 #func:设定线程栈的大小。 线程栈越大,一个线程占用的系统资源就越多。
107 #      如果要启动更多的线程(V1.x对应的参数为max_connections,V2.0为work_threads),可以适当降低本参数值。
108 #valu:如64KB,默认值为64,tracker server线程栈不应小于64KB
109 thread_stack_size=64KB
110 storage_ip_changed_auto_adjust
111 #func:这个参数控制当storage server IP地址改变时,集群是否自动调整。注:只有在storage server进程重启时才完成自动调整。
112 #valu:true或false
113 storage_ip_changed_auto_adjust=true
114 2 同步
115 storage_sync_file_max_delay
116 #func:同组storage服务器之间同步的最大延迟时间。存储服务器之间同步文件的最大延迟时间,根据实际情况进行调整
117 #valu:秒为单位,默认值为1天(24*3600)
118 #sinc:v2.0
119 storage_sync_file_max_delay=86400
120 storage_sync_file_max_time
121 #func:存储服务器同步一个文件需要消耗的最大时间,缺省为300s,即5分钟。
122 #sinc:v2.0
123 storage_sync_file_max_time=300
124 sync_log_buff_interval
125 #func:同步或刷新日志信息到硬盘的时间间隔。注意:tracker server 的日志不是时时写硬盘的,而是先写内存。
126 #valu:以秒为单位
127 sync_log_buff_interval=10
128 3 trunk 和 slot
129 #func:是否使用trunk文件来存储几个小文件
130 #valu:true或false
131 #sinc:v3.0
132 use_trunk_file=false
133 
134 #func:最小slot大小
135 #valu:<= 4KB,默认为256字节
136 #sinc:v3.0
137 slot_min_size=256
138 
139 #func:最大slot大小
140 #valu:>= slot_min_size,当小于这个值的时候就存储到trunk file中。默认为16MB。
141 #sinc:v3.0
142 slot_max_size=16MB
143 
144 #func:trunk file的size
145 #valu:>= 4MB,默认为64MB
146 #sinc:v3.0
147 trunk_file_size=64MB
148 4 HTTP 相关
149 是否启用 HTTP
150 #func:HTTP是否生效
151 #valu:true或false
152 http.disabled=false
153 HTTP 服务器端口号
154 #func:tracker server上的http port
155 #valu:
156 #note:只有http.disabled=false时才生效
157 http.server_port=7271
158 检查Storage存活状态的间隔时间(心跳检测)
159 #func:检查storage http server存活的间隔时间
160 #valu:单位为秒
161 #note:只有http.disabled=false时才生效
162 http.check_alive_interval=30
163 心跳检测使用的协议方式
164 #func:检查storage http server存活的方式
165 #valu:
166 # tcp:连接到storage server的http端口,不进行request和response。
167 # http:storage check alive url must return http status 200.
168 #note:只有http.disabled=false时才生效
169 http.check_alive_type=tcp
170 检查 Storage 状态的 URI
171 #func:检查storage http server是否alive的uri/url
172 #note:只有http.disabled=false时才生效
173 http.check_alive_uri=/status.html

3.1.7、启动。

  /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart

 1 [root@localhost FastDFS]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
 2 [2019-08-08 02:41:07] ERROR - file: process_ctrl.c, line: 189, "/home/FastDFS" can't be accessed, error info: No such file or directory
 3 [root@localhost FastDFS]# pwd
 4 /usr/local/FastDFS
 5 [root@localhost FastDFS]# ll
 6 total 132
 7 drwxr-xr-x. 3 8980 users  4096 Aug  8 02:29 client
 8 drwxr-xr-x. 2 8980 users  4096 Aug  8 02:29 common
 9 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 conf
10 -rw-r--r--. 1 8980 users 35067 Dec  1  2014 COPYING-3_0.txt
11 -rw-r--r--. 1 8980 users  2802 Dec  1  2014 fastdfs.spec
12 -rw-r--r--. 1 8980 users 31386 Dec  1  2014 HISTORY
13 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 init.d
14 -rw-r--r--. 1 8980 users  7755 Dec  1  2014 INSTALL
15 -rwxr-xr-x. 1 8980 users  5813 Dec  1  2014 make.sh
16 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 php_client
17 -rw-r--r--. 1 8980 users  2380 Dec  1  2014 README.md
18 -rwxr-xr-x. 1 8980 users  1768 Dec  1  2014 restart.sh
19 -rwxr-xr-x. 1 8980 users  1680 Dec  1  2014 stop.sh
20 drwxr-xr-x. 4 8980 users  4096 Aug  8 02:29 storage
21 drwxr-xr-x. 2 8980 users  4096 Dec  1  2014 test
22 drwxr-xr-x. 2 8980 users  4096 Aug  8 02:29 tracker
23 [root@localhost FastDFS]# cd /home/
24 [root@localhost home]# ls
25 hadoop
26 [root@localhost home]# ll
27 total 4
28 drwx------. 6 hadoop hadoop 4096 Aug  8 02:18 hadoop
29 [root@localhost home]# mkdir FastDFS
30 [root@localhost home]# ll
31 total 8
32 drwxr-xr-x. 2 root   root   4096 Aug  8 02:41 FastDFS
33 drwx------. 6 hadoop hadoop 4096 Aug  8 02:18 hadoop
34 [root@localhost home]# cd /usr/local/
35 [root@localhost local]# ls
36 bin  etc  FastDFS  FastDFS_v5.05.tar.gz  games  include  lib  libexec  libfastcommon-1.0.7  libfastcommonV1.0.7.tar.gz  sbin  share  src
37 [root@localhost local]# cd FastDFS
38 [root@localhost FastDFS]# ls
39 client  conf             fastdfs.spec  init.d   make.sh     README.md   stop.sh  test
40 common  COPYING-3_0.txt  HISTORY       INSTALL  php_client  restart.sh  storage  tracker
41 [root@localhost FastDFS]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart

root@localhost FastDFS# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart

waiting for pid 5619 exit ...

starting...

注意:如果没有显示如上要注意是否正常停止原有进程。

1 [root@localhost FastDFS]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf stop     关闭的日志显示先停止3950进程(实际环境看你的进程号)再关闭。
2 waiting for pid [3950] exit ...
3 pid [3950] exit.
4 [root@localhost FastDFS]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
5 [root@localhost FastDFS]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
6 waiting for pid [3969] exit ...
7 starting ...
8 [root@localhost FastDFS]#

设置开机自动启动。

root@localhost FastDFS# vim /etc/rc.d/rc.local

将运行命令行添加进文件:/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart

开机测试一下啊,是否是开机自启的,如果没有启动关闭的时候,报不存在,如果启动了,关闭就是显示关闭进程号信息。

1 [root@localhost FastDFS]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf stop
2 pid file: /home/FastDFS/data/fdfs_trackerd.pid not exist!
3 [root@localhost FastDFS]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
4 [root@localhost FastDFS]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf stop
5 waiting for pid [4016] exit ...
6 pid [4016] exit.
7 [root@localhost FastDFS]#

这个显示,说明已经自己自启动了。

4、FastDFS--storage安装。

  因为这里搭建的是小型的,将tracker、storage部署到了一台机器上面,所以storage前三步骤都和tracker一样,那么这里也就是不用安装了,如果在不同的机器上面,就需要再次安装部署的。注意,这里使用的是tracker和storage使用相同的安装包。

4.1、安装libevent

同tracker安装。

4.2、安装libfastcommon

同tracker安装。

4.3、storage编译安装

同tracker编译安装。 

4.4、storage配置。

  安装成功后进入/etc/fdfs目录:

修改storage.conf

 1 修改storage.conf
 2 vi storage.conf
 3 group_name=group1
 4 base_path=/home/yuqing/FastDFS改为:base_path=/home/FastDFS
 5 store_path0=/home/yuqing/FastDFS改为:store_path0=/home/FastDFS/fdfs_storage
 6 #如果有多个挂载磁盘则定义多个store_path,如下
 7 #store_path1=.....
 8 #store_path2=......
 9 tracker_server=192.168.101.3:22122   #配置tracker服务器:IP
10 #如果有多个则配置多个tracker
11 tracker_server=192.168.101.4:22122

拷贝一份新的storage配置文件:cp storage.conf.sample storage.conf

1 [root@localhost ~]# cd /etc/fdfs/
2 [root@localhost fdfs]# ls
3 anti-steal.jpg  client.conf.sample  mime.types    storage.conf.sample  tracker.conf
4 client.conf     http.conf           storage.conf  storage_ids.conf     tracker.conf.sample
5 [root@localhost fdfs]# 
  1 [root@localhost fdfs]# vim storage.conf
  2 
  3 # is this config file disabled
  4 # false for enabled
  5 # true for disabled
  6 disabled=false
  7 
  8 # the name of the group this storage server belongs to
  9 #
 10 # comment or remove this item for fetching from tracker server,
 11 # in this case, use_storage_id must set to true in tracker.conf,
 12 # and storage_ids.conf must be configed correctly.
 13 group_name=group1
 14 
 15 # bind an address of this host
 16 # empty for bind all addresses of this host
 17 bind_addr=
 18 
 19 # if bind an address of this host when connect to other servers 
 20 # (this storage server as a client)
 21 # true for binding the address configed by above parameter: "bind_addr"
 22 # false for binding any address of this host
 23 client_bind=true
 24 
 25 # the storage server port
 26 port=23000
 27 
 28 # connect timeout in seconds
 29 # default value is 30s
 30 connect_timeout=30
 31 
 32 # network timeout in seconds
 33 # default value is 30s
 34 network_timeout=60
 35 
 36 # heart beat interval in seconds
 37 heart_beat_interval=30
 38 
 39 # disk usage report interval in seconds
 40 stat_report_interval=60
 41 
 42 # the base path to store data and log files
 43 base_path=/home/yuqing/fastdfs
 44 
 45 base_path=/home/yuqing/fastdfs
 46 # max concurrent connections the server supported
 47 # default value is 256
 48 # more max_connections means more memory will be used
 49 max_connections=256
 50 
 51 # the buff size to recv / send data
 52 # this parameter must more than 8KB
 53 # default value is 64KB
 54 # since V2.00
 55 buff_size = 256KB
 56 
 57 # accept thread count
 58 # default value is 1
 59 # since V4.07
 60 accept_threads=1
 61 
 62 # work thread count, should <= max_connections
 63 # work thread deal network io
 64 # default value is 4
 65 # since V2.00
 66 work_threads=4
 67 
 68 # if disk read / write separated
 69 ##  false for mixed read and write
 70 ##  true for separated read and write
 71 # default value is true
 72 # since V2.00
 73 disk_rw_separated = true
 74 
 75 # disk reader thread count per store base path
 76 # for mixed read / write, this parameter can be 0
 77 # default value is 1
 78 # since V2.00
 79 disk_reader_threads = 1
 80 
 81 # disk writer thread count per store base path
 82 # for mixed read / write, this parameter can be 0
 83 # default value is 1
 84 # since V2.00
 85 disk_writer_threads = 1
 86 
 87 # when no entry to sync, try read binlog again after X milliseconds
 88 # must > 0, default value is 200ms
 89 sync_wait_msec=50
 90 
 91 # after sync a file, usleep milliseconds
 92 # 0 for sync successively (never call usleep)
 93 sync_interval=0
 94 # the name of the group this storage server belongs to
 95 #
 96 # comment or remove this item for fetching from tracker server,
 97 # in this case, use_storage_id must set to true in tracker.conf,
 98 # and storage_ids.conf must be configed correctly.
 99 group_name=group1
100 
101 # bind an address of this host
102 # empty for bind all addresses of this host
103 bind_addr=
104 
105 # if bind an address of this host when connect to other servers 
106 # (this storage server as a client)
107 # true for binding the address configed by above parameter: "bind_addr"
108 # false for binding any address of this host
109 client_bind=true
110 
111 # the storage server port
112 port=23000
113 
114 # connect timeout in seconds
115 # default value is 30s
116 connect_timeout=30
117 
118 # network timeout in seconds
119 # default value is 30s
120 network_timeout=60
121 
122 # heart beat interval in seconds
123 heart_beat_interval=30
124 
125 # disk usage report interval in seconds
126 stat_report_interval=60
127 
128 # the base path to store data and log files
129 # base_path=/home/yuqing/fastdfs
130 base_path=/home/FastDFS
131 
132 # max concurrent connections the server supported
133 # default value is 256
134 # more max_connections means more memory will be used
135 max_connections=256
136 
137 # the buff size to recv / send data
138 # this parameter must more than 8KB
139 # default value is 64KB
140 # since V2.00
141 buff_size = 256KB
142 
143 # accept thread count
144 # default value is 1
145 # since V4.07
146 accept_threads=1
147 
148 # work thread count, should <= max_connections
149 # work thread deal network io
150 # default value is 4
151 # since V2.00
152 work_threads=4
153 
154 # if disk read / write separated
155 ##  false for mixed read and write
156 ##  true for separated read and write
157 # default value is true
158 # since V2.00
159 disk_rw_separated = true
160 
161 # disk reader thread count per store base path
162 # for mixed read / write, this parameter can be 0
163 # default value is 1
164 # since V2.00
165 disk_reader_threads = 1
166 
167 # disk writer thread count per store base path
168 # for mixed read / write, this parameter can be 0
169 # default value is 1
170 # since V2.00
171 disk_writer_threads = 1
172 
173 # when no entry to sync, try read binlog again after X milliseconds
174 # must > 0, default value is 200ms
175 sync_wait_msec=50
176 
177 # default value is 64KB
178 # since V2.00
179 buff_size = 256KB
180 
181 # accept thread count
182 # default value is 1
183 # since V4.07
184 accept_threads=1
185 
186 # work thread count, should <= max_connections
187 # work thread deal network io
188 # default value is 4
189 # since V2.00
190 work_threads=4
191 
192 # if disk read / write separated
193 ##  false for mixed read and write
194 ##  true for separated read and write
195 # default value is true
196 # since V2.00
197 disk_rw_separated = true
198 
199 # disk reader thread count per store base path
200 # for mixed read / write, this parameter can be 0
201 # default value is 1
202 # since V2.00
203 disk_reader_threads = 1
204 
205 # disk writer thread count per store base path
206 # for mixed read / write, this parameter can be 0
207 # default value is 1
208 # since V2.00
209 disk_writer_threads = 1
210 
211 # when no entry to sync, try read binlog again after X milliseconds
212 # must > 0, default value is 200ms
213 sync_wait_msec=50
214 
215 # after sync a file, usleep milliseconds
216 # 0 for sync successively (never call usleep)
217 sync_interval=0
218 
219 # storage sync start time of a day, time format: Hour:Minute
220 # Hour from 0 to 23, Minute from 0 to 59
221 sync_start_time=00:00
222 
223 # storage sync end time of a day, time format: Hour:Minute
224 # Hour from 0 to 23, Minute from 0 to 59
225 sync_end_time=23:59
226 
227 # write to the mark file after sync N files
228 # default value is 500
229 write_mark_file_freq=500
230 
231 # path(disk or mount point) count, default value is 1
232 store_path_count=1
233 
234 # store_path#, based 0, if store_path0 not exists, it's value is base_path
235 # the paths must be exist
236 # store_path0=/home/yuqing/fastdfs
237 store_path0=/home/FastDFS/fdfs_storage
238 
239 #store_path1=/home/yuqing/fastdfs2
240 
241 # subdir_count  * subdir_count directories will be auto created under each 
242 # store_path (disk), value can be 1 to 256, default value is 256
243 subdir_count_per_path=256
244 
245 # tracker_server can ocur more than once, and tracker_server format is
246 #  "host:port", host can be hostname or ip address
247 # tracker_server=192.168.209.121:22122
248 tracker_server=192.168.110.141:22122
249 
250 #standard log level as syslog, case insensitive, value list:
251 ### emerg for emergency
252 ### notice
253 ### info
254 ### debug
255 log_level=info
256 
257 run_by_group=
258 
259 #unix username to run this program,
260 #not set (empty) means run by current user
261 run_by_user=
262 
263 # allow_hosts can ocur more than once, host can be hostname or ip address,
264 # "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or
265 # host[01-08,20-25].domain.com, for example:
266 # allow_hosts=10.0.1.[1-15,20]
267 # allow_hosts=host[01-08,20-25].domain.com
268 allow_hosts=*
269 
270 # the mode of the files distributed to the data path
271 # 0: round robin(default)
272 # 1: random, distributted by hash code
273 file_distribute_path_mode=0
274 
275 # valid when file_distribute_to_path is set to 0 (round robin), 
276 # when the written file count reaches this number, then rotate to next path
277 # default value is 100
278 file_distribute_rotate_count=100
279 
280 # call fsync to disk when write big file
281 # 0: never call fsync
282 # other: call fsync when written bytes >= this bytes
283 # default value is 0 (never call fsync)
284 fsync_after_written_bytes=0
285 
286 # sync log buff to disk every interval seconds
287 # must > 0, default value is 10 seconds
288 sync_log_buff_interval=10
289 
290 # sync binlog buff / cache to disk every interval seconds
291 # default value is 60 seconds
292 sync_binlog_buff_interval=10
293 
294 # sync storage stat info to disk every interval seconds
295 # default value is 300 seconds
296 sync_stat_file_interval=300
297 
298 # thread stack size, should >= 512KB
299 # default value is 512KB
300 thread_stack_size=512KB
301 
302 # the priority as a source server for uploading file.
303 # the lower this value, the higher its uploading priority.
304 # default value is 10
305 upload_priority=10
306 
307 # the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a
308 # multi aliases split by comma. empty value means auto set by OS type
309 # default values is empty
310 if_alias_prefix=
311 
312 # if check file duplicate, when set to true, use FastDHT to store file indexes
313 # 1 or yes: need check
314 # 0 or no: do not check
315 # default value is 0
316 check_file_duplicate=0
317 
318 # file signature method for check file duplicate
319 ## hash: four 32 bits hash code
320 ## md5: MD5 signature
321 # default value is hash
322 # since V4.01
323 file_signature_method=hash
324 
325 # namespace for storing file indexes (key-value pairs)
326 # this item must be set when check_file_duplicate is true / on
327 key_namespace=FastDFS
328 
329 # set keep_alive to 1 to enable persistent connection with FastDHT servers
330 # default value is 0 (short connection)
331 keep_alive=0
332 
333 # you can use "#include filename" (not include double quotes) directive to 
334 # load FastDHT server list, when the filename is a relative path such as 
335 # pure filename, the base path is the base path of current/this config file.
336 # must set FastDHT server list when check_file_duplicate is true / on
337 # please see INSTALL of FastDHT for detail
338 ##include /home/yuqing/fastdht/conf/fdht_servers.conf
339 
340 # if log to access log
341 # default value is false
342 # since V4.00
343 use_access_log = false
344 
345 # if rotate the access log every day
346 # default value is false
347 # since V4.00
348 rotate_access_log = false
349 
350 # rotate access log time base, time format: Hour:Minute
351 # Hour from 0 to 23, Minute from 0 to 59
352 # default value is 00:00
353 # since V4.00
354 access_log_rotate_time=00:00
355 
356 # if rotate the error log every day
357 # default value is false
358 # since V4.02
359 rotate_error_log = false
360 
361 # rotate error log time base, time format: Hour:Minute
362 # Hour from 0 to 23, Minute from 0 to 59
363 # default value is 00:00
364 # since V4.02
365 error_log_rotate_time=00:00
366 
367 # rotate access log when the log file exceeds this size
368 # 0 means never rotates log file by log file size
369 # default value is 0
370 # since V4.02
371 rotate_access_log_size = 0
372 
373 # rotate error log when the log file exceeds this size
374 # 0 means never rotates log file by log file size
375 # default value is 0
376 # since V4.02
377 rotate_error_log_size = 0
378 
379 # keep days of the log files
380 # 0 means do not delete old log files
381 # default value is 0
382 log_file_keep_days = 0
383 
384 # if skip the invalid record when sync file
385 # default value is false
386 # since V4.02
387 file_sync_skip_invalid_record=false
388 
389 # if use connection pool
390 # default value is false
391 # since V4.05
392 use_connection_pool = false
393 
394 # connections whose the idle time exceeds this time will be closed
395 # unit: second
396 # default value is 3600
397 # since V4.05
398 connection_pool_max_idle_time = 3600
399 
400 # use the ip address of this storage server if domain_name is empty,
401 # else this domain name will ocur in the url redirected by the tracker server
402 http.domain_name=
403 
404 # the port of the web server on this storage server
405 http.server_port=8888

注意,记得创建你的目录哦。

root@localhost FastDFS# mkdir fdfs_storage

4.5、启动。

/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart

1 [root@localhost FastDFS]# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
2 [root@localhost FastDFS]# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf stop
3 waiting for pid [2452] exit ...
4 pid [2452] exit.
5 [root@localhost FastDFS]# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf start
6 [root@localhost FastDFS]# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
7 waiting for pid [2464] exit ...
8 starting ...
9 [root@localhost FastDFS]# 

设置开机自动启动。

root@localhost FastDFS# vim /etc/rc.d/rc.local

5、FastDFS 和nginx整合。

5.1、在tracker上安装nginx。在每个tracker上安装nginx,的主要目的是做负载均衡及实现高可用。如果只有一台tracker服务器可以不配置nginx。

这里就先不安装tracker服务器nginx的。

5.2、在Storage上安装nginx。

将FastDFS-nginx-module_v1.16.tar.gz传至/usr/local/下

cd /usr/local

tar -zxvf FastDFS-nginx-module_v1.16.tar.gz

cd FastDFS-nginx-module/src

修改config文件将/usr/local/路径改为/usr/

 1 [root@localhost ~]# cd /usr/local/
 2 [root@localhost local]# ls
 3 bin  FastDFS                            FastDFS_v5.05.tar.gz  include  libexec              libfastcommonV1.0.7.tar.gz  share
 4 etc  fastdfs-nginx-module_v1.16.tar.gz  games                 lib      libfastcommon-1.0.7  sbin                        src
 5 [root@localhost local]# tar -zxvf fastdfs-nginx-module_v1.16.tar.gz 
 6 fastdfs-nginx-module/
 7 fastdfs-nginx-module/src/
 8 fastdfs-nginx-module/src/ngx_http_fastdfs_module.c
 9 fastdfs-nginx-module/src/mod_fastdfs.conf
10 fastdfs-nginx-module/src/config
11 fastdfs-nginx-module/src/common.h
12 fastdfs-nginx-module/src/common.c
13 fastdfs-nginx-module/INSTALL
14 fastdfs-nginx-module/HISTORY
15 [root@localhost local]# ls
16 bin  FastDFS               fastdfs-nginx-module_v1.16.tar.gz  games    lib      libfastcommon-1.0.7         sbin   src
17 etc  fastdfs-nginx-module  FastDFS_v5.05.tar.gz               include  libexec  libfastcommonV1.0.7.tar.gz  share
18 [root@localhost local]# cd fastdfs-nginx-module/src/
19 [root@localhost src]# ls
20 common.c  common.h  config  mod_fastdfs.conf  ngx_http_fastdfs_module.c
21 [root@localhost src]# cd co
22 common.c  common.h  config    
23 [root@localhost src]# cd config 
24 -bash: cd: config: Not a directory
25 [root@localhost src]# vim config

如下所示:

将FastDFS-nginx-module/src下的mod_FastDFS.conf拷贝至/etc/fdfs/下

cp mod_FastDFS.conf /etc/fdfs/

1 [root@localhost src]# pwd
2 /usr/local/fastdfs-nginx-module/src
3 [root@localhost src]# ls
4 common.c  common.h  config  mod_fastdfs.conf  ngx_http_fastdfs_module.c
5 [root@localhost src]# cp mod_fastdfs.conf /etc/fdfs/

并修改mod_FastDFS.conf的内容:

1 vi /etc/fdfs/mod_FastDFS.conf
2 base_path=/home/FastDFS
3 tracker_server=192.168.101.3:22122
4 #tracker_server=192.168.101.4:22122(多个tracker配置多行)
5 url_have_group_name=true        #url中包含group名称
6 store_path0=/home/FastDFS/fdfs_storage   #指定文件存储路径
  1 [root@localhost src]# vim /etc/fdfs/mod_fastdfs.conf 
  2 
  3 # connect timeout in seconds
  4 # default value is 30s
  5 connect_timeout=2
  6 
  7 # network recv and send timeout in seconds
  8 # default value is 30s
  9 network_timeout=30
 10 
 11 # the base path to store log files
 12 base_path=/tmp
 13 
 14 # if load FastDFS parameters from tracker server
 15 # since V1.12
 16 # default value is false
 17 load_fdfs_parameters_from_tracker=true
 18 
 19 # storage sync file max delay seconds
 20 # same as tracker.conf
 21 # valid only when load_fdfs_parameters_from_tracker is false
 22 # since V1.12
 23 # default value is 86400 seconds (one day)
 24 storage_sync_file_max_delay = 86400
 25 
 26 # if use storage ID instead of IP address
 27 # same as tracker.conf
 28 # valid only when load_fdfs_parameters_from_tracker is false
 29 # default value is false
 30 # since V1.13
 31 use_storage_id = false
 32 
 33 # specify storage ids filename, can use relative or absolute path
 34 # same as tracker.conf
 35 # valid only when load_fdfs_parameters_from_tracker is false
 36 # since V1.13
 37 storage_ids_filename = storage_ids.conf
 38 
 39 # FastDFS tracker_server can ocur more than once, and tracker_server format is
 40 # connect timeout in seconds
 41 # default value is 30s
 42 connect_timeout=2
 43 
 44 # network recv and send timeout in seconds
 45 # default value is 30s
 46 network_timeout=30
 47 
 48 # the base path to store log files
 49 base_path=/tmp
 50 
 51 # if load FastDFS parameters from tracker server
 52 # since V1.12
 53 # default value is false
 54 load_fdfs_parameters_from_tracker=true
 55 
 56 # storage sync file max delay seconds
 57 # same as tracker.conf
 58 # valid only when load_fdfs_parameters_from_tracker is false
 59 # since V1.12
 60 # default value is 86400 seconds (one day)
 61 storage_sync_file_max_delay = 86400
 62 
 63 # if use storage ID instead of IP address
 64 # same as tracker.conf
 65 # valid only when load_fdfs_parameters_from_tracker is false
 66 # default value is false
 67 # since V1.13
 68 use_storage_id = false
 69 
 70 # specify storage ids filename, can use relative or absolute path
 71 # same as tracker.conf
 72 # valid only when load_fdfs_parameters_from_tracker is false
 73 # since V1.13
 74 storage_ids_filename = storage_ids.conf
 75 
 76 # FastDFS tracker_server can ocur more than once, and tracker_server format is
 77 #  "host:port", host can be hostname or ip address
 78 # valid only when load_fdfs_parameters_from_tracker is true
 79 tracker_server=tracker:22122
 80 
 81 # the port of the local storage server
 82 # the default value is 23000
 83 storage_server_port=23000
 84 
 85 # the group name of the local storage server
 86 group_name=group1
 87 
 88 # if the url / uri including the group name
 89 # set to false when uri like /M00/00/00/xxx
 90 # set to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxx
 91 # default value is false
 92 url_have_group_name = false
 93 
 94 # path(disk or mount point) count, default value is 1
 95 # must same as storage.conf
 96 store_path_count=1
 97 
 98 # store_path#, based 0, if store_path0 not exists, it's value is base_path
 99 # the paths must be exist
100 # must same as storage.conf
101 # store_path0=/home/yuqing/fastdfs
102 store_path0=/home/FastDFS/fdfs_storage
103 
104 #store_path1=/home/yuqing/fastdfs1
105 ### emerg for emergency
106 ### alert
107 ### crit for critical
108 ### error
109 ### warn for warning
110 ### notice
111 ### info
112 ### debug
113 log_level=info
114 
115 # set the log filename, such as /usr/local/apache2/logs/mod_fastdfs.log
116 # empty for output to stderr (apache and nginx error_log file)
117 log_filename=
118 
119 # response mode when the file not exist in the local file system
120 ## proxy: get the content from other storage server, then send to client
121 ## redirect: redirect to the original storage server (HTTP Header is Location)
122 response_mode=proxy
123 
124 # the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a
125 # multi aliases split by comma. empty value means auto set by OS type
126 # this paramter used to get all ip address of the local host
127 # default values is empty
128 if_alias_prefix=
129 
130 # use "#include" directive to include HTTP config file
131 # NOTE: #include is an include directive, do NOT remove the # before include
132 #include http.conf
133 # connect timeout in seconds
134 # default value is 30s
135 connect_timeout=2
136 
137 # network recv and send timeout in seconds
138 # default value is 30s
139 network_timeout=30
140 
141 # the base path to store log files
142 # base_path=/tmp
143 base_path=/home/FastDFS
144 
145 # if load FastDFS parameters from tracker server
146 # since V1.12
147 # default value is false
148 load_fdfs_parameters_from_tracker=true
149 
150 # storage sync file max delay seconds
151 # same as tracker.conf
152 # valid only when load_fdfs_parameters_from_tracker is false
153 # since V1.12
154 # default value is 86400 seconds (one day)
155 storage_sync_file_max_delay = 86400
156 
157 # if use storage ID instead of IP address
158 # same as tracker.conf
159 # valid only when load_fdfs_parameters_from_tracker is false
160 # default value is false
161 # since V1.13
162 use_storage_id = false
163 
164 # specify storage ids filename, can use relative or absolute path
165 # same as tracker.conf
166 # valid only when load_fdfs_parameters_from_tracker is false
167 # since V1.13
168 storage_ids_filename = storage_ids.conf
169 
170 # FastDFS tracker_server can ocur more than once, and tracker_server format is
171 #  "host:port", host can be hostname or ip address
172 # valid only when load_fdfs_parameters_from_tracker is true
173 tracker_server=192.168.110.141:22122
174 
175 # the port of the local storage server
176 # the default value is 23000
177 storage_server_port=23000
178 
179 # the group name of the local storage server
180 group_name=group1
181 
182 # if the url / uri including the group name
183 # set to false when uri like /M00/00/00/xxx
184 # set to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxx
185 # default value is false
186 # url_have_group_name = false
187 url_have_group_name = true
188 
189 # path(disk or mount point) count, default value is 1
190 # must same as storage.conf
191 store_path_count=1
192 
193 # store_path#, based 0, if store_path0 not exists, it's value is base_path
194 # the paths must be exist
195 # must same as storage.conf
196 # store_path0=/home/yuqing/fastdfs
197 store_path0=/home/FastDFS/fdfs_storage
198 
199 #store_path1=/home/yuqing/fastdfs1
200 
201 # standard log level as syslog, case insensitive, value list:
202 ### emerg for emergency
203 ### alert
204 ### crit for critical
205 ### error
206 ### warn for warning
207 ### notice
208 ### info
209 ### debug
210 log_level=info
211 
212 # set the log filename, such as /usr/local/apache2/logs/mod_fastdfs.log
213 # empty for output to stderr (apache and nginx error_log file)
214 log_filename=
215 
216 # response mode when the file not exist in the local file system
217 ## proxy: get the content from other storage server, then send to client
218 ## redirect: redirect to the original storage server (HTTP Header is Location)
219 response_mode=proxy
220 
221 # the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a
222 # multi aliases split by comma. empty value means auto set by OS type
223 # this paramter used to get all ip address of the local host
224 # default values is empty
225 if_alias_prefix=
226 
227 # use "#include" directive to include HTTP config file
228 # NOTE: #include is an include directive, do NOT remove the # before include
229 #include http.conf
230 
231 
232 # if support flv
233 # default value is false
234 # since v1.15
235 flv_support = true
236 
237 # flv file extension name
238 # default value is flv
239 # since v1.15
240 flv_extension = flv
241 
242 
243 # set the group count
244 # set to none zero to support multi-group
245 # set to 0  for single group only
246 # groups settings section as [group1], [group2], ..., [groupN]
247 # default value is 0
248 # since v1.14
249 group_count = 0
250 
251 # group settings for group #1
252 # since v1.14
253 # when support multi-group, uncomment following section
254 #[group1]
255 #group_name=group1
256 #storage_server_port=23000
257 #store_path_count=2
258 #store_path0=/home/yuqing/fastdfs
259 #store_path1=/home/yuqing/fastdfs1
260 
261 # group settings for group #2
262 # since v1.14
263 # when support multi-group, uncomment following section as neccessary
264 #[group2]
265 #group_name=group2
266 #storage_server_port=23000
267 #store_path_count=1
268 #store_path0=/home/yuqing/fastdfs

将libfdfsclient.so拷贝至/usr/lib下。

root@localhost src# cp /usr/lib64/libfdfsclient.so /usr/lib/

创建nginx/client目录。

root@localhost src# mkdir -p /var/temp/nginx/client

5.3、nginx安装。添加FastDFS-nginx-module模块。

 1 [root@localhost src]# ./configure \
 2 > --prefix=/usr/local/nginx \
 3 > --pid-path=/var/run/nginx/nginx.pid \
 4 > --lock-path=/var/lock/nginx.lock \
 5 > --error-log-path=/var/log/nginx/error.log \
 6 > --http-log-path=/var/log/nginx/access.log \
 7 > --with-http_gzip_static_module \
 8 > --http-client-body-temp-path=/var/temp/nginx/client \
 9 > --http-proxy-temp-path=/var/temp/nginx/proxy \
10 > --http-fastcgi-temp-path=/var/temp/nginx/fastcgi \
11 > --http-uwsgi-temp-path=/var/temp/nginx/uwsgi \
12 > --http-scgi-temp-path=/var/temp/nginx/scgi \
13 > --add-module=/root/fastdfs-nginx-module/src
14 -bash: ./configure: No such file or directory
15 [root@localhost src]#

-bash: ./configure: No such file or directory也许是因为我没有安装nginx的原因,先安装一个nginx。

nginx的安装参考:https://cloud.tencent.com/developer/article/1469994

步骤如下所示:

root@localhost ~# yum install -y gcc-c++

root@localhost ~# yum install -y pcre pcre-devel

root@localhost ~# yum install -y zlib zlib-devel

root@localhost ~# yum install -y openssl openssl-devel

root@localhost package# wget http://nginx.org/download/nginx-1.8.0.tar.gz

root@localhost local# tar -zxvf nginx-1.8.0.tar.gz

父目录/var/temp/nginx 目录,nginx 服务应用无法自主创建.必须有 linux 服务器管理员提前创建。

我是先安装上面参考链接,执行安装了nginx,然后再执行下面的语句的。

在nginx的目录执行如下所示:

 1 ./configure \
 2 --prefix=/usr/local/nginx \
 3 --pid-path=/var/run/nginx/nginx.pid \
 4 --lock-path=/var/lock/nginx.lock \
 5 --error-log-path=/var/log/nginx/error.log \
 6 --http-log-path=/var/log/nginx/access.log \
 7 --with-http_gzip_static_module \
 8 --http-client-body-temp-path=/var/temp/nginx/client \
 9 --http-proxy-temp-path=/var/temp/nginx/proxy \
10 --http-fastcgi-temp-path=/var/temp/nginx/fastcgi \
11 --http-uwsgi-temp-path=/var/temp/nginx/uwsgi \
12 --http-scgi-temp-path=/var/temp/nginx/scgi \
13 --add-module=/root/fastdfs-nginx-module/src
--add-module=/usr/local/fastdfs-nginx-module/src

执行效果如下所示:

报错了。./configure: error: no /root/fastdfs-nginx-module/src/config was found。怎么解决呢,应该是没有这个目录,手动创建一下,试试,看看还报错不。root@localhost ~# mkdir -p root/fastdfs-nginx-module/src

  1 [root@localhost nginx-1.8.0]# cd /usr/local/nginx-1.8.0
  2 [root@localhost nginx-1.8.0]# ls
  3 auto  CHANGES  CHANGES.ru  conf  configure  contrib  html  LICENSE  man  README  src
  4 [root@localhost nginx-1.8.0]# ./configure \
  5 > --prefix=/usr/local/nginx \
  6 > --pid-path=/var/run/nginx/nginx.pid \
  7 > --lock-path=/var/lock/nginx.lock \
  8 > --error-log-path=/var/log/nginx/error.log \
  9 > --http-log-path=/var/log/nginx/access.log \
 10 > --with-http_gzip_static_module \
 11 > --http-client-body-temp-path=/var/temp/nginx/client \
 12 > --http-proxy-temp-path=/var/temp/nginx/proxy \
 13 > --http-fastcgi-temp-path=/var/temp/nginx/fastcgi \
 14 > --http-uwsgi-temp-path=/var/temp/nginx/uwsgi \
 15 > --http-scgi-temp-path=/var/temp/nginx/scgi \
 16 > --add-module=/root/fastdfs-nginx-module/src
 17 checking for OS
 18  + Linux 2.6.32-358.el6.i686 i686
 19 checking for C compiler ... found
 20  + using GNU C compiler
 21  + gcc version: 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC) 
 22 checking for gcc -pipe switch ... found
 23 checking for gcc builtin atomic operations ... found
 24 checking for C99 variadic macros ... found
 25 checking for gcc variadic macros ... found
 26 checking for unistd.h ... found
 27 checking for inttypes.h ... found
 28 checking for limits.h ... found
 29 checking for sys/filio.h ... not found
 30 checking for sys/param.h ... found
 31 checking for sys/mount.h ... found
 32 checking for sys/statvfs.h ... found
 33 checking for crypt.h ... found
 34 checking for Linux specific features
 35 checking for epoll ... found
 36 checking for EPOLLRDHUP ... found
 37 checking for O_PATH ... not found
 38 checking for sendfile() ... found
 39 checking for sendfile64() ... found
 40 checking for sys/prctl.h ... found
 41 checking for prctl(PR_SET_DUMPABLE) ... found
 42 checking for sched_setaffinity() ... found
 43 checking for crypt_r() ... found
 44 checking for sys/vfs.h ... found
 45 checking for nobody group ... found
 46 checking for poll() ... found
 47 checking for /dev/poll ... not found
 48 checking for kqueue ... not found
 49 checking for crypt() ... not found
 50 checking for crypt() in libcrypt ... found
 51 checking for F_READAHEAD ... not found
 52 checking for posix_fadvise() ... found
 53 checking for O_DIRECT ... found
 54 checking for F_NOCACHE ... not found
 55 checking for directio() ... not found
 56 checking for statfs() ... found
 57 checking for statvfs() ... found
 58 checking for dlopen() ... not found
 59 checking for dlopen() in libdl ... found
 60 checking for sched_yield() ... found
 61 checking for SO_SETFIB ... not found
 62 checking for SO_ACCEPTFILTER ... not found
 63 checking for TCP_DEFER_ACCEPT ... found
 64 checking for TCP_KEEPIDLE ... found
 65 checking for TCP_FASTOPEN ... not found
 66 checking for TCP_INFO ... found
 67 checking for accept4() ... found
 68 checking for eventfd() ... found
 69 checking for int size ... 4 bytes
 70 checking for long size ... 4 bytes
 71 checking for long long size ... 8 bytes
 72 checking for void * size ... 4 bytes
 73 checking for uint64_t ... found
 74 checking for sig_atomic_t ... found
 75 checking for sig_atomic_t size ... 4 bytes
 76 checking for socklen_t ... found
 77 checking for in_addr_t ... found
 78 checking for in_port_t ... found
 79 checking for rlim_t ... found
 80 checking for uintptr_t ... uintptr_t found
 81 checking for system byte ordering ... little endian
 82 checking for size_t size ... 4 bytes
 83 checking for off_t size ... 8 bytes
 84 checking for time_t size ... 4 bytes
 85 checking for setproctitle() ... not found
 86 checking for pread() ... found
 87 checking for pwrite() ... found
 88 checking for sys_nerr ... found
 89 checking for localtime_r() ... found
 90 checking for posix_memalign() ... found
 91 checking for memalign() ... found
 92 checking for mmap(MAP_ANON|MAP_SHARED) ... found
 93 checking for mmap("/dev/zero", MAP_SHARED) ... found
 94 checking for System V shared memory ... found
 95 checking for POSIX semaphores ... not found
 96 checking for POSIX semaphores in libpthread ... found
 97 checking for struct msghdr.msg_control ... found
 98 checking for ioctl(FIONBIO) ... found
 99 checking for struct tm.tm_gmtoff ... found
100 checking for struct dirent.d_namlen ... not found
101 checking for struct dirent.d_type ... found
102 checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
103 checking for openat(), fstatat() ... found
104 checking for getaddrinfo() ... found
105 configuring additional modules
106 adding module in /root/fastdfs-nginx-module/src
107 ./configure: error: no /root/fastdfs-nginx-module/src/config was found
108 [root@localhost nginx-1.8.0]# 

再试一次,看看还报错不。还是报错,我将--add-module=/usr/local/fastdfs-nginx-module/src修改成了这个,然后执行。

注意,我的fastdfs-nginx-module这个是安装到了/usr/local下面的,所以下面--add-module=/usr/local/fastdfs-nginx-module/src指定这个目录。

root@localhost nginx-1.8.0# make && make install

  1 [root@localhost nginx-1.8.0]# ./configure \
  2 > --prefix=/usr/local/nginx \
  3 > --pid-path=/var/run/nginx/nginx.pid \
  4 > --lock-path=/var/lock/nginx.lock \
  5 emp-path=/var/temp/nginx/client \
  6 --http-proxy-temp-path=/var/temp/nginx/proxy \
  7 --http-fastcgi-temp-path=/var/temp/nginx/fastcgi \
  8 --http-uwsgi-temp-path=/var/temp/nginx/uwsgi \
  9 --http-scgi-temp-path=/var/temp/nginx/scgi \
 10 --add-module=/usr/local/fastdfs-> --error-log-path=/var/log/nginx/error.log \
 11 > --http-log-path=/var/log/nginx/access.log \
 12 > --with-http_gzip_static_module \
 13 > --http-client-body-temp-path=/var/temp/nginx/client \
 14 > --http-proxy-temp-path=/var/temp/nginx/proxy \
 15 > --http-fastcgi-temp-path=/var/temp/nginx/fastcgi \
 16 > --http-uwsgi-temp-path=/var/temp/nginx/uwsgi \
 17 > --http-scgi-temp-path=/var/temp/nginx/scgi \
 18 > --add-module=/usr/local/fastdfs-nginx-module/src
 19 checking for OS
 20  + Linux 2.6.32-358.el6.i686 i686
 21 checking for C compiler ... found
 22  + using GNU C compiler
 23  + gcc version: 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC) 
 24 checking for gcc -pipe switch ... found
 25 checking for gcc builtin atomic operations ... found
 26 checking for C99 variadic macros ... found
 27 checking for gcc variadic macros ... found
 28 checking for unistd.h ... found
 29 checking for inttypes.h ... found
 30 checking for limits.h ... found
 31 checking for sys/filio.h ... not found
 32 checking for sys/param.h ... found
 33 checking for sys/mount.h ... found
 34 checking for sys/statvfs.h ... found
 35 checking for crypt.h ... found
 36 checking for Linux specific features
 37 checking for epoll ... found
 38 checking for EPOLLRDHUP ... found
 39 checking for O_PATH ... not found
 40 checking for sendfile() ... found
 41 checking for sendfile64() ... found
 42 checking for sys/prctl.h ... found
 43 checking for prctl(PR_SET_DUMPABLE) ... found
 44 checking for sched_setaffinity() ... found
 45 checking for crypt_r() ... found
 46 checking for sys/vfs.h ... found
 47 checking for nobody group ... found
 48 checking for poll() ... found
 49 checking for /dev/poll ... not found
 50 checking for kqueue ... not found
 51 checking for crypt() ... not found
 52 checking for crypt() in libcrypt ... found
 53 checking for F_READAHEAD ... not found
 54 checking for posix_fadvise() ... found
 55 checking for O_DIRECT ... found
 56 checking for F_NOCACHE ... not found
 57 checking for directio() ... not found
 58 checking for statfs() ... found
 59 checking for statvfs() ... found
 60 checking for dlopen() ... not found
 61 checking for dlopen() in libdl ... found
 62 checking for sched_yield() ... found
 63 checking for SO_SETFIB ... not found
 64 checking for SO_ACCEPTFILTER ... not found
 65 checking for TCP_DEFER_ACCEPT ... found
 66 checking for TCP_KEEPIDLE ... found
 67 checking for TCP_FASTOPEN ... not found
 68 checking for TCP_INFO ... found
 69 checking for accept4() ... found
 70 checking for eventfd() ... found
 71 checking for int size ... 4 bytes
 72 checking for long size ... 4 bytes
 73 checking for long long size ... 8 bytes
 74 checking for void * size ... 4 bytes
 75 checking for uint64_t ... found
 76 checking for sig_atomic_t ... found
 77 checking for sig_atomic_t size ... 4 bytes
 78 checking for socklen_t ... found
 79 checking for in_addr_t ... found
 80 checking for in_port_t ... found
 81 checking for rlim_t ... found
 82 checking for uintptr_t ... uintptr_t found
 83 checking for system byte ordering ... little endian
 84 checking for size_t size ... 4 bytes
 85 checking for off_t size ... 8 bytes
 86 checking for time_t size ... 4 bytes
 87 checking for setproctitle() ... not found
 88 checking for pread() ... found
 89 checking for pwrite() ... found
 90 checking for sys_nerr ... found
 91 checking for localtime_r() ... found
 92 checking for posix_memalign() ... found
 93 checking for memalign() ... found
 94 checking for mmap(MAP_ANON|MAP_SHARED) ... found
 95 checking for mmap("/dev/zero", MAP_SHARED) ... found
 96 checking for System V shared memory ... found
 97 checking for POSIX semaphores ... not found
 98 checking for POSIX semaphores in libpthread ... found
 99 checking for struct msghdr.msg_control ... found
100 checking for ioctl(FIONBIO) ... found
101 checking for struct tm.tm_gmtoff ... found
102 checking for struct dirent.d_namlen ... not found
103 checking for struct dirent.d_type ... found
104 checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
105 checking for openat(), fstatat() ... found
106 checking for getaddrinfo() ... found
107 configuring additional modules
108 adding module in /usr/local/fastdfs-nginx-module/src
109  + ngx_http_fastdfs_module was configured
110 checking for PCRE library ... found
111 checking for PCRE JIT support ... not found
112 checking for md5 in system md library ... not found
113 checking for md5 in system md5 library ... not found
114 checking for md5 in system OpenSSL crypto library ... found
115 checking for sha1 in system md library ... not found
116 checking for sha1 in system OpenSSL crypto library ... found
117 checking for zlib library ... found
118 creating objs/Makefile
119 
120 Configuration summary
121   + using system PCRE library
122   + OpenSSL library is not used
123   + md5: using system crypto library
124   + sha1: using system crypto library
125   + using system zlib library
126 
127   nginx path prefix: "/usr/local/nginx"
128   nginx binary file: "/usr/local/nginx/sbin/nginx"
129   nginx configuration prefix: "/usr/local/nginx/conf"
130   nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
131   nginx pid file: "/var/run/nginx/nginx.pid"
132   nginx error log file: "/var/log/nginx/error.log"
133   nginx http access log file: "/var/log/nginx/access.log"
134   nginx http client request body temporary files: "/var/temp/nginx/client"
135   nginx http proxy temporary files: "/var/temp/nginx/proxy"
136   nginx http fastcgi temporary files: "/var/temp/nginx/fastcgi"
137   nginx http uwsgi temporary files: "/var/temp/nginx/uwsgi"
138   nginx http scgi temporary files: "/var/temp/nginx/scgi"
139 
140 [root@localhost nginx-1.8.0]# make && make install
141 make -f objs/Makefile
142 make[1]: Entering directory `/usr/local/nginx-1.8.0'
143 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
144         -o objs/src/core/nginx.o \
145         src/core/nginx.c
146 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
147         -o objs/src/core/ngx_log.o \
148         src/core/ngx_log.c
149 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
150         -o objs/src/core/ngx_palloc.o \
151         src/core/ngx_palloc.c
152 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
153         -o objs/src/core/ngx_array.o \
154         src/core/ngx_array.c
155 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
156         -o objs/src/core/ngx_list.o \
157         src/core/ngx_list.c
158 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
159         -o objs/src/core/ngx_hash.o \
160         src/core/ngx_hash.c
161 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
162         -o objs/src/core/ngx_buf.o \
163         src/core/ngx_buf.c
164 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
165         -o objs/src/core/ngx_queue.o \
166         src/core/ngx_queue.c
167 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
168         -o objs/src/core/ngx_output_chain.o \
169         src/core/ngx_output_chain.c
170 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
171         -o objs/src/core/ngx_string.o \
172         src/core/ngx_string.c
173 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
174         -o objs/src/core/ngx_parse.o \
175         src/core/ngx_parse.c
176 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
177         -o objs/src/core/ngx_inet.o \
178         src/core/ngx_inet.c
179 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
180         -o objs/src/core/ngx_file.o \
181         src/core/ngx_file.c
182 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
183         -o objs/src/core/ngx_crc32.o \
184         src/core/ngx_crc32.c
185 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
186         -o objs/src/core/ngx_murmurhash.o \
187         src/core/ngx_murmurhash.c
188 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
189         -o objs/src/core/ngx_md5.o \
190         src/core/ngx_md5.c
191 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
192         -o objs/src/core/ngx_rbtree.o \
193         src/core/ngx_rbtree.c
194 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
195         -o objs/src/core/ngx_radix_tree.o \
196         src/core/ngx_radix_tree.c
197 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
198         -o objs/src/core/ngx_slab.o \
199         src/core/ngx_slab.c
200 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
201         -o objs/src/core/ngx_times.o \
202         src/core/ngx_times.c
203 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
204         -o objs/src/core/ngx_shmtx.o \
205         src/core/ngx_shmtx.c
206 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
207         -o objs/src/core/ngx_connection.o \
208         src/core/ngx_connection.c
209 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
210         -o objs/src/core/ngx_cycle.o \
211         src/core/ngx_cycle.c
212 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
213         -o objs/src/core/ngx_spinlock.o \
214         src/core/ngx_spinlock.c
215 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
216         -o objs/src/core/ngx_cpuinfo.o \
217         src/core/ngx_cpuinfo.c
218 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
219         -o objs/src/core/ngx_conf_file.o \
220         src/core/ngx_conf_file.c
221 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
222         -o objs/src/core/ngx_resolver.o \
223         src/core/ngx_resolver.c
224 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
225         -o objs/src/core/ngx_open_file_cache.o \
226         src/core/ngx_open_file_cache.c
227 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
228         -o objs/src/core/ngx_crypt.o \
229         src/core/ngx_crypt.c
230 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
231         -o objs/src/core/ngx_proxy_protocol.o \
232         src/core/ngx_proxy_protocol.c
233 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
234         -o objs/src/core/ngx_syslog.o \
235         src/core/ngx_syslog.c
236 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
237         -o objs/src/event/ngx_event.o \
238         src/event/ngx_event.c
239 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
240         -o objs/src/event/ngx_event_timer.o \
241         src/event/ngx_event_timer.c
242 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
243         -o objs/src/event/ngx_event_posted.o \
244         src/event/ngx_event_posted.c
245 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
246         -o objs/src/event/ngx_event_accept.o \
247         src/event/ngx_event_accept.c
248 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
249         -o objs/src/event/ngx_event_connect.o \
250         src/event/ngx_event_connect.c
251 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
252         -o objs/src/event/ngx_event_pipe.o \
253         src/event/ngx_event_pipe.c
254 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
255         -o objs/src/os/unix/ngx_time.o \
256         src/os/unix/ngx_time.c
257 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
258         -o objs/src/os/unix/ngx_errno.o \
259         src/os/unix/ngx_errno.c
260 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
261         -o objs/src/os/unix/ngx_alloc.o \
262         src/os/unix/ngx_alloc.c
263 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
264         -o objs/src/os/unix/ngx_files.o \
265         src/os/unix/ngx_files.c
266 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
267         -o objs/src/os/unix/ngx_socket.o \
268         src/os/unix/ngx_socket.c
269 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
270         -o objs/src/os/unix/ngx_recv.o \
271         src/os/unix/ngx_recv.c
272 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
273         -o objs/src/os/unix/ngx_readv_chain.o \
274         src/os/unix/ngx_readv_chain.c
275 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
276         -o objs/src/os/unix/ngx_udp_recv.o \
277         src/os/unix/ngx_udp_recv.c
278 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
279         -o objs/src/os/unix/ngx_send.o \
280         src/os/unix/ngx_send.c
281 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
282         -o objs/src/os/unix/ngx_writev_chain.o \
283         src/os/unix/ngx_writev_chain.c
284 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
285         -o objs/src/os/unix/ngx_channel.o \
286         src/os/unix/ngx_channel.c
287 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
288         -o objs/src/os/unix/ngx_shmem.o \
289         src/os/unix/ngx_shmem.c
290 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
291         -o objs/src/os/unix/ngx_process.o \
292         src/os/unix/ngx_process.c
293 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
294         -o objs/src/os/unix/ngx_daemon.o \
295         src/os/unix/ngx_daemon.c
296 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
297         -o objs/src/os/unix/ngx_setaffinity.o \
298         src/os/unix/ngx_setaffinity.c
299 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
300         -o objs/src/os/unix/ngx_setproctitle.o \
301         src/os/unix/ngx_setproctitle.c
302 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
303         -o objs/src/os/unix/ngx_posix_init.o \
304         src/os/unix/ngx_posix_init.c
305 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
306         -o objs/src/os/unix/ngx_user.o \
307         src/os/unix/ngx_user.c
308 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
309         -o objs/src/os/unix/ngx_process_cycle.o \
310         src/os/unix/ngx_process_cycle.c
311 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
312         -o objs/src/os/unix/ngx_linux_init.o \
313         src/os/unix/ngx_linux_init.c
314 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
315         -o objs/src/event/modules/ngx_epoll_module.o \
316         src/event/modules/ngx_epoll_module.c
317 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
318         -o objs/src/os/unix/ngx_linux_sendfile_chain.o \
319         src/os/unix/ngx_linux_sendfile_chain.c
320 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
321         -o objs/src/core/ngx_regex.o \
322         src/core/ngx_regex.c
323 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
324         -o objs/src/http/ngx_http.o \
325         src/http/ngx_http.c
326 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
327         -o objs/src/http/ngx_http_core_module.o \
328         src/http/ngx_http_core_module.c
329 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
330         -o objs/src/http/ngx_http_special_response.o \
331         src/http/ngx_http_special_response.c
332 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
333         -o objs/src/http/ngx_http_request.o \
334         src/http/ngx_http_request.c
335 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
336         -o objs/src/http/ngx_http_parse.o \
337         src/http/ngx_http_parse.c
338 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
339         -o objs/src/http/ngx_http_header_filter_module.o \
340         src/http/ngx_http_header_filter_module.c
341 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
342         -o objs/src/http/ngx_http_write_filter_module.o \
343         src/http/ngx_http_write_filter_module.c
344 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
345         -o objs/src/http/ngx_http_copy_filter_module.o \
346         src/http/ngx_http_copy_filter_module.c
347 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
348         -o objs/src/http/modules/ngx_http_log_module.o \
349         src/http/modules/ngx_http_log_module.c
350 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
351         -o objs/src/http/ngx_http_request_body.o \
352         src/http/ngx_http_request_body.c
353 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
354         -o objs/src/http/ngx_http_variables.o \
355         src/http/ngx_http_variables.c
356 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
357         -o objs/src/http/ngx_http_script.o \
358         src/http/ngx_http_script.c
359 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
360         -o objs/src/http/ngx_http_upstream.o \
361         src/http/ngx_http_upstream.c
362 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
363         -o objs/src/http/ngx_http_upstream_round_robin.o \
364         src/http/ngx_http_upstream_round_robin.c
365 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
366         -o objs/src/http/ngx_http_parse_time.o \
367         src/http/ngx_http_parse_time.c
368 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
369         -o objs/src/http/modules/ngx_http_static_module.o \
370         src/http/modules/ngx_http_static_module.c
371 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
372         -o objs/src/http/modules/ngx_http_index_module.o \
373         src/http/modules/ngx_http_index_module.c
374 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
375         -o objs/src/http/modules/ngx_http_chunked_filter_module.o \
376         src/http/modules/ngx_http_chunked_filter_module.c
377 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
378         -o objs/src/http/modules/ngx_http_range_filter_module.o \
379         src/http/modules/ngx_http_range_filter_module.c
380 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
381         -o objs/src/http/modules/ngx_http_headers_filter_module.o \
382         src/http/modules/ngx_http_headers_filter_module.c
383 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
384         -o objs/src/http/modules/ngx_http_not_modified_filter_module.o \
385         src/http/modules/ngx_http_not_modified_filter_module.c
386 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
387         -o objs/src/http/ngx_http_file_cache.o \
388         src/http/ngx_http_file_cache.c
389 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
390         -o objs/src/http/modules/ngx_http_gzip_filter_module.o \
391         src/http/modules/ngx_http_gzip_filter_module.c
392 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
393         -o objs/src/http/ngx_http_postpone_filter_module.o \
394         src/http/ngx_http_postpone_filter_module.c
395 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
396         -o objs/src/http/modules/ngx_http_ssi_filter_module.o \
397         src/http/modules/ngx_http_ssi_filter_module.c
398 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
399         -o objs/src/http/modules/ngx_http_charset_filter_module.o \
400         src/http/modules/ngx_http_charset_filter_module.c
401 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
402         -o objs/src/http/modules/ngx_http_userid_filter_module.o \
403         src/http/modules/ngx_http_userid_filter_module.c
404 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
405         -o objs/src/http/modules/ngx_http_gzip_static_module.o \
406         src/http/modules/ngx_http_gzip_static_module.c
407 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
408         -o objs/src/http/modules/ngx_http_autoindex_module.o \
409         src/http/modules/ngx_http_autoindex_module.c
410 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
411         -o objs/src/http/modules/ngx_http_auth_basic_module.o \
412         src/http/modules/ngx_http_auth_basic_module.c
413 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
414         -o objs/src/http/modules/ngx_http_access_module.o \
415         src/http/modules/ngx_http_access_module.c
416 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
417         -o objs/src/http/modules/ngx_http_limit_conn_module.o \
418         src/http/modules/ngx_http_limit_conn_module.c
419 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
420         -o objs/src/http/modules/ngx_http_limit_req_module.o \
421         src/http/modules/ngx_http_limit_req_module.c
422 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
423         -o objs/src/http/modules/ngx_http_geo_module.o \
424         src/http/modules/ngx_http_geo_module.c
425 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
426         -o objs/src/http/modules/ngx_http_map_module.o \
427         src/http/modules/ngx_http_map_module.c
428 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
429         -o objs/src/http/modules/ngx_http_split_clients_module.o \
430         src/http/modules/ngx_http_split_clients_module.c
431 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
432         -o objs/src/http/modules/ngx_http_referer_module.o \
433         src/http/modules/ngx_http_referer_module.c
434 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
435         -o objs/src/http/modules/ngx_http_rewrite_module.o \
436         src/http/modules/ngx_http_rewrite_module.c
437 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
438         -o objs/src/http/modules/ngx_http_proxy_module.o \
439         src/http/modules/ngx_http_proxy_module.c
440 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
441         -o objs/src/http/modules/ngx_http_fastcgi_module.o \
442         src/http/modules/ngx_http_fastcgi_module.c
443 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
444         -o objs/src/http/modules/ngx_http_uwsgi_module.o \
445         src/http/modules/ngx_http_uwsgi_module.c
446 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
447         -o objs/src/http/modules/ngx_http_scgi_module.o \
448         src/http/modules/ngx_http_scgi_module.c
449 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
450         -o objs/src/http/modules/ngx_http_memcached_module.o \
451         src/http/modules/ngx_http_memcached_module.c
452 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
453         -o objs/src/http/modules/ngx_http_empty_gif_module.o \
454         src/http/modules/ngx_http_empty_gif_module.c
455 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
456         -o objs/src/http/modules/ngx_http_browser_module.o \
457         src/http/modules/ngx_http_browser_module.c
458 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
459         -o objs/src/http/modules/ngx_http_upstream_hash_module.o \
460         src/http/modules/ngx_http_upstream_hash_module.c
461 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
462         -o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
463         src/http/modules/ngx_http_upstream_ip_hash_module.c
464 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
465         -o objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
466         src/http/modules/ngx_http_upstream_least_conn_module.c
467 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules \
468         -o objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
469         src/http/modules/ngx_http_upstream_keepalive_module.c
470 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"'  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs -I src/http -I src/http/modules -I src/mail \
471         -o objs/addon/src/ngx_http_fastdfs_module.o \
472         /usr/local/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c
473 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"' -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/fastdfs -I /usr/include/fastcommon/ -I objs \
474         -o objs/ngx_modules.o \
475         objs/ngx_modules.c
476 cc -o objs/nginx \
477     objs/src/core/nginx.o \
478     objs/src/core/ngx_log.o \
479     objs/src/core/ngx_palloc.o \
480     objs/src/core/ngx_array.o \
481     objs/src/core/ngx_list.o \
482     objs/src/core/ngx_hash.o \
483     objs/src/core/ngx_buf.o \
484     objs/src/core/ngx_queue.o \
485     objs/src/core/ngx_output_chain.o \
486     objs/src/core/ngx_string.o \
487     objs/src/core/ngx_parse.o \
488     objs/src/core/ngx_inet.o \
489     objs/src/core/ngx_file.o \
490     objs/src/core/ngx_crc32.o \
491     objs/src/core/ngx_murmurhash.o \
492     objs/src/core/ngx_md5.o \
493     objs/src/core/ngx_rbtree.o \
494     objs/src/core/ngx_radix_tree.o \
495     objs/src/core/ngx_slab.o \
496     objs/src/core/ngx_times.o \
497     objs/src/core/ngx_shmtx.o \
498     objs/src/core/ngx_connection.o \
499     objs/src/core/ngx_cycle.o \
500     objs/src/core/ngx_spinlock.o \
501     objs/src/core/ngx_cpuinfo.o \
502     objs/src/core/ngx_conf_file.o \
503     objs/src/core/ngx_resolver.o \
504     objs/src/core/ngx_open_file_cache.o \
505     objs/src/core/ngx_crypt.o \
506     objs/src/core/ngx_proxy_protocol.o \
507     objs/src/core/ngx_syslog.o \
508     objs/src/event/ngx_event.o \
509     objs/src/event/ngx_event_timer.o \
510     objs/src/event/ngx_event_posted.o \
511     objs/src/event/ngx_event_accept.o \
512     objs/src/event/ngx_event_connect.o \
513     objs/src/event/ngx_event_pipe.o \
514     objs/src/os/unix/ngx_time.o \
515     objs/src/os/unix/ngx_errno.o \
516     objs/src/os/unix/ngx_alloc.o \
517     objs/src/os/unix/ngx_files.o \
518     objs/src/os/unix/ngx_socket.o \
519     objs/src/os/unix/ngx_recv.o \
520     objs/src/os/unix/ngx_readv_chain.o \
521     objs/src/os/unix/ngx_udp_recv.o \
522     objs/src/os/unix/ngx_send.o \
523     objs/src/os/unix/ngx_writev_chain.o \
524     objs/src/os/unix/ngx_channel.o \
525     objs/src/os/unix/ngx_shmem.o \
526     objs/src/os/unix/ngx_process.o \
527     objs/src/os/unix/ngx_daemon.o \
528     objs/src/os/unix/ngx_setaffinity.o \
529     objs/src/os/unix/ngx_setproctitle.o \
530     objs/src/os/unix/ngx_posix_init.o \
531     objs/src/os/unix/ngx_user.o \
532     objs/src/os/unix/ngx_process_cycle.o \
533     objs/src/os/unix/ngx_linux_init.o \
534     objs/src/event/modules/ngx_epoll_module.o \
535     objs/src/os/unix/ngx_linux_sendfile_chain.o \
536     objs/src/core/ngx_regex.o \
537     objs/src/http/ngx_http.o \
538     objs/src/http/ngx_http_core_module.o \
539     objs/src/http/ngx_http_special_response.o \
540     objs/src/http/ngx_http_request.o \
541     objs/src/http/ngx_http_parse.o \
542     objs/src/http/ngx_http_header_filter_module.o \
543     objs/src/http/ngx_http_write_filter_module.o \
544     objs/src/http/ngx_http_copy_filter_module.o \
545     objs/src/http/modules/ngx_http_log_module.o \
546     objs/src/http/ngx_http_request_body.o \
547     objs/src/http/ngx_http_variables.o \
548     objs/src/http/ngx_http_script.o \
549     objs/src/http/ngx_http_upstream.o \
550     objs/src/http/ngx_http_upstream_round_robin.o \
551     objs/src/http/ngx_http_parse_time.o \
552     objs/src/http/modules/ngx_http_static_module.o \
553     objs/src/http/modules/ngx_http_index_module.o \
554     objs/src/http/modules/ngx_http_chunked_filter_module.o \
555     objs/src/http/modules/ngx_http_range_filter_module.o \
556     objs/src/http/modules/ngx_http_headers_filter_module.o \
557     objs/src/http/modules/ngx_http_not_modified_filter_module.o \
558     objs/src/http/ngx_http_file_cache.o \
559     objs/src/http/modules/ngx_http_gzip_filter_module.o \
560     objs/src/http/ngx_http_postpone_filter_module.o \
561     objs/src/http/modules/ngx_http_ssi_filter_module.o \
562     objs/src/http/modules/ngx_http_charset_filter_module.o \
563     objs/src/http/modules/ngx_http_userid_filter_module.o \
564     objs/src/http/modules/ngx_http_gzip_static_module.o \
565     objs/src/http/modules/ngx_http_autoindex_module.o \
566     objs/src/http/modules/ngx_http_auth_basic_module.o \
567     objs/src/http/modules/ngx_http_access_module.o \
568     objs/src/http/modules/ngx_http_limit_conn_module.o \
569     objs/src/http/modules/ngx_http_limit_req_module.o \
570     objs/src/http/modules/ngx_http_geo_module.o \
571     objs/src/http/modules/ngx_http_map_module.o \
572     objs/src/http/modules/ngx_http_split_clients_module.o \
573     objs/src/http/modules/ngx_http_referer_module.o \
574     objs/src/http/modules/ngx_http_rewrite_module.o \
575     objs/src/http/modules/ngx_http_proxy_module.o \
576     objs/src/http/modules/ngx_http_fastcgi_module.o \
577     objs/src/http/modules/ngx_http_uwsgi_module.o \
578     objs/src/http/modules/ngx_http_scgi_module.o \
579     objs/src/http/modules/ngx_http_memcached_module.o \
580     objs/src/http/modules/ngx_http_empty_gif_module.o \
581     objs/src/http/modules/ngx_http_browser_module.o \
582     objs/src/http/modules/ngx_http_upstream_hash_module.o \
583     objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
584     objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
585     objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
586     objs/addon/src/ngx_http_fastdfs_module.o \
587     objs/ngx_modules.o \
588     -lpthread -lcrypt -L/usr/lib -lfastcommon -lfdfsclient -lpcre -lcrypto -lcrypto -lz
589 make[1]: Leaving directory `/usr/local/nginx-1.8.0'
590 make -f objs/Makefile manpage
591 make[1]: Entering directory `/usr/local/nginx-1.8.0'
592 sed -e "s|%%PREFIX%%|/usr/local/nginx|" \
593         -e "s|%%PID_PATH%%|/var/run/nginx/nginx.pid|" \
594         -e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \
595         -e "s|%%ERROR_LOG_PATH%%|/var/log/nginx/error.log|" \
596         < man/nginx.8 > objs/nginx.8
597 make[1]: Leaving directory `/usr/local/nginx-1.8.0'
598 make -f objs/Makefile install
599 make[1]: Entering directory `/usr/local/nginx-1.8.0'
600 test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx'
601 test -d '/usr/local/nginx/sbin'         || mkdir -p '/usr/local/nginx/sbin'
602 test ! -f '/usr/local/nginx/sbin/nginx'         || mv '/usr/local/nginx/sbin/nginx'             '/usr/local/nginx/sbin/nginx.old'
603 cp objs/nginx '/usr/local/nginx/sbin/nginx'
604 test -d '/usr/local/nginx/conf'         || mkdir -p '/usr/local/nginx/conf'
605 cp conf/koi-win '/usr/local/nginx/conf'
606 cp conf/koi-utf '/usr/local/nginx/conf'
607 cp conf/win-utf '/usr/local/nginx/conf'
608 test -f '/usr/local/nginx/conf/mime.types'         || cp conf/mime.types '/usr/local/nginx/conf'
609 cp conf/mime.types '/usr/local/nginx/conf/mime.types.default'
610 test -f '/usr/local/nginx/conf/fastcgi_params'         || cp conf/fastcgi_params '/usr/local/nginx/conf'
611 cp conf/fastcgi_params         '/usr/local/nginx/conf/fastcgi_params.default'
612 test -f '/usr/local/nginx/conf/fastcgi.conf'         || cp conf/fastcgi.conf '/usr/local/nginx/conf'
613 cp conf/fastcgi.conf '/usr/local/nginx/conf/fastcgi.conf.default'
614 test -f '/usr/local/nginx/conf/uwsgi_params'         || cp conf/uwsgi_params '/usr/local/nginx/conf'
615 cp conf/uwsgi_params         '/usr/local/nginx/conf/uwsgi_params.default'
616 test -f '/usr/local/nginx/conf/scgi_params'         || cp conf/scgi_params '/usr/local/nginx/conf'
617 cp conf/scgi_params         '/usr/local/nginx/conf/scgi_params.default'
618 test -f '/usr/local/nginx/conf/nginx.conf'         || cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf'
619 cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf.default'
620 test -d '/var/run/nginx'         || mkdir -p '/var/run/nginx'
621 test -d '/var/log/nginx' ||         mkdir -p '/var/log/nginx'
622 test -d '/usr/local/nginx/html'         || cp -R html '/usr/local/nginx'
623 test -d '/var/log/nginx' ||         mkdir -p '/var/log/nginx'
624 make[1]: Leaving directory `/usr/local/nginx-1.8.0'

5.4、nginx配置文件。

新建一个nginx配置文件nginx-fdfs.conf。

添加server:

 1 [root@localhost src]# cd /usr/local/
 2 [root@localhost local]# ls
 3 bin  FastDFS               fastdfs-nginx-module_v1.16.tar.gz  games    lib      libfastcommon-1.0.7         nginx        nginx-1.8.0.tar.gz  share
 4 etc  fastdfs-nginx-module  FastDFS_v5.05.tar.gz               include  libexec  libfastcommonV1.0.7.tar.gz  nginx-1.8.0  sbin                src
 5 [root@localhost local]# cd nginx
 6 [root@localhost nginx]# ls
 7 conf  html  sbin
 8 [root@localhost nginx]# cd conf/
 9 [root@localhost conf]# ls
10 fastcgi.conf          fastcgi_params          koi-utf  mime.types          nginx.conf          scgi_params          uwsgi_params          win-utf
11 fastcgi.conf.default  fastcgi_params.default  koi-win  mime.types.default  nginx.conf.default  scgi_params.default  uwsgi_params.default
12 [root@localhost conf]# vim nginx-fdfs.conf
13 [root@localhost conf]# 

操作如下所示:

配置如下所示:

说明:

server_name指定本机ip

location /group1/M00/:group1为nginx 服务FastDFS的分组名称,M00是FastDFS自动生成编号,对应store_path0=/home/FastDFS/fdfs_storage,如果FastDFS定义store_path1,这里就是M01。

1 server {
2         listen       80;
3         server_name  192.168.110.141;
4 
5         location /group1/M00/{
6                 #root /home/FastDFS/fdfs_storage/data;
7                 ngx_fastdfs_module;
8         }
9 }

nginx-fdfs.conf完整配置如下所示:

 1 user  root;   # user 代表访问权限是什么,就是通过 nginx 访问 linux 服务器中文件时,使用的用户权限 
 2 
 3 worker_processes  1; # 工作流程id
 4 
 5 events { 
 6    worker_connections  1024;
 7 }
 8 
 9 http {
10     include       mime.types;    # 加载响应类型
11     default_type  application/octet-stream;    # 默认使用 IO 流实现请求/应答
12     sendfile        on;        # 是否支持文件传输
13     keepalive_timeout  65;    # 心跳监测。    
14     server {
15         listen       80;
16         server_name  192.168.110.141;
17         location /group1/M00/{
18                 #root /home/FastDFS/fdfs_storage/data;
19                 ngx_fastdfs_module;
20         }
21     error_page   500 502 503 504  /50x.html;
22     location = /50x.html {
23         root   html;
24         }
25     }
26 }

6、上传图片测试。

FastDFS安装成功可通过/usr/bin/fdfs_test测试上传、下载等操作。

修改/etc/fdfs/client.conf

root@localhost ~# vim /etc/fdfs/client.conf

base_path=/home/FastDFS

tracker_server=192.168.110.141:22122

 1 [root@localhost ~]# cat /etc/fdfs/client.conf
 2 # connect timeout in seconds
 3 # default value is 30s
 4 connect_timeout=30
 5 
 6 # network timeout in seconds
 7 # default value is 30s
 8 network_timeout=60
 9 
10 # the base path to store log files
11 # base_path=/home/yuqing/fastdfs
12 base_path=/home/FastDFS
13 
14 # tracker_server can ocur more than once, and tracker_server format is
15 #  "host:port", host can be hostname or ip address
16 # tracker_server=192.168.0.197:22122
17 tracker_server=192.168.110.141:22122
18 
19 #standard log level as syslog, case insensitive, value list:
20 ### emerg for emergency
21 ### alert
22 ### crit for critical
23 ### error
24 ### warn for warning
25 ### notice
26 ### info
27 ### debug
28 log_level=info
29 
30 # if use connection pool
31 # default value is false
32 # since V4.05
33 use_connection_pool = false
34 
35 # connections whose the idle time exceeds this time will be closed
36 # unit: second
37 # default value is 3600
38 # since V4.05
39 connection_pool_max_idle_time = 3600
40 
41 # if load FastDFS parameters from tracker server
42 # since V4.05
43 # default value is false
44 load_fdfs_parameters_from_tracker=false
45 
46 # if use storage ID instead of IP address
47 # same as tracker.conf
48 # valid only when load_fdfs_parameters_from_tracker is false
49 # default value is false
50 # since V4.05
51 use_storage_id = false
52 
53 # specify storage ids filename, can use relative or absolute path
54 # same as tracker.conf
55 # valid only when load_fdfs_parameters_from_tracker is false
56 # since V4.05
57 storage_ids_filename = storage_ids.conf
58 
59 
60 #HTTP settings
61 http.tracker_server_port=80
62 
63 #use "#include" directive to include HTTP other settiongs
64 ##include http.conf
65 
66 [root@localhost ~]# 

执行效果如下所示:

使用格式:

/usr/bin/fdfs_test 客户端配置文件地址 upload 上传文件

比如将/home下的图片上传到FastDFS中:

root@localhost ~# /usr/bin/fdfs_test /etc/fdfs/client.conf upload /home/1.jpg

或者这样上传图片也是一样的。

root@localhost 00# /usr/bin/fdfs_upload_file /etc/fdfs/client.conf /home/1.jpg

group1/M00/00/00/wKhujV1ONISAGqBNAAO8BX6Ln_A360.jpg

 1 [root@localhost ~]# /usr/bin/fdfs_test /etc/fdfs/client.conf upload /home/1.jpg 
 2 This is FastDFS client test program v5.05
 3 
 4 Copyright (C) 2008, Happy Fish / YuQing
 5 
 6 FastDFS may be copied only under the terms of the GNU General
 7 Public License V3, which may be found in the FastDFS source kit.
 8 Please visit the FastDFS Home Page http://www.csource.org/ 
 9 for more detail.
10 
11 [2019-08-09 03:09:17] DEBUG - base_path=/home/FastDFS, 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: 0
12 
13 tracker_query_storage_store_list_without_group: 
14     server 1. group_name=, ip_addr=192.168.110.141, port=23000
15 
16 group_name=group1, ip_addr=192.168.110.141, port=23000
17 storage_upload_by_filename
18 group_name=group1, remote_filename=M00/00/00/wKhujV1NRk2ACyZPAAO8BX6Ln_A114.jpg
19 source ip address: 192.168.110.141
20 file timestamp=2019-08-09 03:09:17
21 file size=244741
22 file crc32=2123079664
23 example file url: http://192.168.110.141/group1/M00/00/00/wKhujV1NRk2ACyZPAAO8BX6Ln_A114.jpg
24 storage_upload_slave_by_filename
25 group_name=group1, remote_filename=M00/00/00/wKhujV1NRk2ACyZPAAO8BX6Ln_A114_big.jpg
26 source ip address: 192.168.110.141
27 file timestamp=2019-08-09 03:09:17
28 file size=244741
29 file crc32=2123079664
30 example file url: http://192.168.110.141/group1/M00/00/00/wKhujV1NRk2ACyZPAAO8BX6Ln_A114_big.jpg
31 [root@localhost ~]# 

http://192.168.110.141/group1/M00/00/00/wKhujV1NRk2ACyZPAAO8BX6Ln_A114_big.jpg就是文件的下载路径。

对应storage服务器上的。

/home/fastdfs/fdfs_storage/data/00/00/wKhujV1NRk2ACyZPAAO8BX6Ln_A114.jpg文件。

和nginx整合完毕可以使用http下载。但是我的报了404界面。如下所示。

然后修改了。这个时候有点绝望了,百度了很多教程,检查了很多次,基本搞了一天了,绝望的一笔啊。还是报404,这个时候可能难受,发现自己菜的一毛,但是能放弃吗,哎,我大概捋一下步骤和解决的过程吧。

No1,首选看一下各个配置文件的路径吧。

tracker.conf配置文件修改配置如下所示:

1 [root@localhost fdfs]# cd /etc/fdfs
2 [root@localhost fdfs]# vim tracker.conf
3 base_path=/home/FastDFS

tracker.conf配置文件修改配置如下所示:

1 [root@localhost fdfs]# vim storage.conf
2 group_name=group1
3 base_path=/home/FastDFS
4 store_path0=/home/FastDFS/fdfs_storage
5 tracker_server=192.168.110.141:22122
6 http.server_port=80      # #跟你在nginx.conf配置的舰艇端口号保持一致,并且为了可以省略不写端口号,建议改成80

client.conf配置文件修改配置如下所示:

1 [root@localhost fdfs]# vim client.conf
2 base_path=/home/FastDFS
3 tracker_server=192.168.110.141:22122

mod_fastdfs.conf配置文件修改配置如下所示:

1 [root@localhost fdfs]# vim mod_fastdfs.conf
2 base_path=/home/FastDFS
3 tracker_server=192.168.110.141:22122
4 url_have_group_name = true     #url中包含group名称
5 store_path0=/home/FastDFS/fdfs_storage

下面看一下上面频繁用到的这个文件夹,最后效果是这样的。mkdir FastDFS、mkdir fdfs_storage文件夹是自己创建的。

显而易见,文件是上传成功的,那么说明你搭建的fastdfs是成功的了,下载不了,所以检查一下文件路径是否正常以后,就不要再纠结你的fastdfs搭建了,如果路径都正常,90%就是和nginx整合出的问题了,可能是你配置fastdfs和nginx整合的时候出了问题,现在分析一下啊可能出现的问题。

先说明一下我是这样上传文件的,先将图片拷贝到了/home目录下面,就是下面这个幂幂,然后使用该命令进行上传图片。

 1 [root@localhost fdfs]# /usr/bin/fdfs_test /etc/fdfs/client.conf upload /home/3.jpg
 2 This is FastDFS client test program v5.05
 3 
 4 Copyright (C) 2008, Happy Fish / YuQing
 5 
 6 FastDFS may be copied only under the terms of the GNU General
 7 Public License V3, which may be found in the FastDFS source kit.
 8 Please visit the FastDFS Home Page http://www.csource.org/ 
 9 for more detail.
10 
11 [2019-08-10 00:41:58] DEBUG - base_path=/home/FastDFS, 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: 0
12 
13 tracker_query_storage_store_list_without_group: 
14     server 1. group_name=, ip_addr=192.168.110.141, port=23000
15 
16 group_name=group1, ip_addr=192.168.110.141, port=23000
17 storage_upload_by_filename
18 group_name=group1, remote_filename=M00/00/00/wKhujV1OdUaAG8JLAAC78d32NX8446.jpg
19 source ip address: 192.168.110.141
20 file timestamp=2019-08-10 00:41:58
21 file size=48113
22 file crc32=3723900287
23 example file url: http://192.168.110.141/group1/M00/00/00/wKhujV1OdUaAG8JLAAC78d32NX8446.jpg
24 storage_upload_slave_by_filename
25 group_name=group1, remote_filename=M00/00/00/wKhujV1OdUaAG8JLAAC78d32NX8446_big.jpg
26 source ip address: 192.168.110.141
27 file timestamp=2019-08-10 00:41:58
28 file size=48113
29 file crc32=3723900287
30 example file url: http://192.168.110.141/group1/M00/00/00/wKhujV1OdUaAG8JLAAC78d32NX8446_big.jpg
31 [root@localhost fdfs]# 

然后你访问的效果如下所示:

下面分析一下整合过程中可能出现的问题。

No2,分析和fastdfs整合的部分。好多小伙伴都说我的nginx.conf添加了user root;还是报404,找不到路径,下载不了图片,也是郁闷,我开始也是报404,找不到路径,下载不了图片,因为一开始我创建的文件是nginx-fdfs.conf,后来我就将nginx-fdfs.conf_back文件改成了nginx.conf。

nginx.conf就是下面这样配置的,注意下面这段配置,你可能百度一下,配置都是五花八门的,我就是这样配置的,可以正常访问。

location /group1/M00/{

            #root /home/FastDFS/fdfs\_storage/data;
            ngx\_fastdfs\_module;

}

  1 [root@localhost nginx]# ls
  2 conf  html  sbin
  3 [root@localhost nginx]# cd conf/
  4 [root@localhost conf]# ls
  5 fastcgi.conf          fastcgi_params          koi-utf  mime.types          nginx.conf       nginx.conf.default    scgi_params          uwsgi_params          win-utf
  6 fastcgi.conf.default  fastcgi_params.default  koi-win  mime.types.default  nginx.conf_back  nginx-fdfs.conf_back  scgi_params.default  uwsgi_params.default
  7 [root@localhost conf]# vim nginx.conf
  8 [root@localhost conf]# cat nginx.conf
  9 user root;
 10 
 11 #user  nobody;
 12 worker_processes  1;
 13 
 14 #error_log  logs/error.log;
 15 #error_log  logs/error.log  notice;
 16 #error_log  logs/error.log  info;
 17 
 18 #pid        logs/nginx.pid;
 19 
 20 
 21 events {
 22     worker_connections  1024;
 23 }
 24 
 25 
 26 http {
 27     include       mime.types;
 28     default_type  application/octet-stream;
 29 
 30     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
 31     #                  '$status $body_bytes_sent "$http_referer" '
 32     #                  '"$http_user_agent" "$http_x_forwarded_for"';
 33 
 34     #access_log  logs/access.log  main;
 35 
 36     sendfile        on;
 37     #tcp_nopush     on;
 38 
 39     #keepalive_timeout  0;
 40     keepalive_timeout  65;
 41 
 42     #gzip  on;
 43 
 44     server {
 45         listen       80;
 46         server_name  192.168.110.141;
 47 
 48         #charset koi8-r;
 49 
 50         #access_log  logs/host.access.log  main;
 51 
 52         #location / {
 53         #    root   html;
 54         #    index  index.html index.htm;
 55         #}
 56         
 57     location /group1/M00/{
 58                 #root /home/FastDFS/fdfs_storage/data;
 59                 ngx_fastdfs_module;
 60          }
 61 
 62         #error_page  404              /404.html;
 63 
 64         # redirect server error pages to the static page /50x.html
 65         #
 66         error_page   500 502 503 504  /50x.html;
 67         location = /50x.html {
 68             root   html;
 69         }
 70 
 71         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
 72         #
 73         #location ~ \.php$ {
 74         #    proxy_pass   http://127.0.0.1;
 75         #}
 76 
 77         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 78         #
 79         #location ~ \.php$ {
 80         #    root           html;
 81         #    fastcgi_pass   127.0.0.1:9000;
 82         #    fastcgi_index  index.php;
 83         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
 84         #    include        fastcgi_params;
 85         #}
 86 
 87         # deny access to .htaccess files, if Apache's document root
 88         # concurs with nginx's one
 89         #
 90         #location ~ /\.ht {
 91         #    deny  all;
 92         #}
 93     }
 94 
 95 
 96     # another virtual host using mix of IP-, name-, and port-based configuration
 97     #
 98     #server {
 99     #    listen       8000;
100     #    listen       somename:8080;
101     #    server_name  somename  alias  another.alias;
102 
103     #    location / {
104     #        root   html;
105     #        index  index.html index.htm;
106     #    }
107     #}
108 
109 
110     # HTTPS server
111     #
112     #server {
113     #    listen       443 ssl;
114     #    server_name  localhost;
115 
116     #    ssl_certificate      cert.pem;
117     #    ssl_certificate_key  cert.key;
118 
119     #    ssl_session_cache    shared:SSL:1m;
120     #    ssl_session_timeout  5m;
121 
122     #    ssl_ciphers  HIGH:!aNULL:!MD5;
123     #    ssl_prefer_server_ciphers  on;
124 
125     #    location / {
126     #        root   html;
127     #        index  index.html index.htm;
128     #    }
129     #}
130 
131 }
132 [root@localhost conf]# 

当然了,关闭防火墙,是第一时间要想到的问题,所以这个就不细说了。还有说防火墙拦截了端口号,我也没搞到这么深,解决问题了就行。建议默认端口号80。

待续......

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-08-09 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
文件存储
文件存储(Cloud File Storage,CFS)为您提供安全可靠、可扩展的共享文件存储服务。文件存储可与腾讯云服务器、容器服务、批量计算等服务搭配使用,为多个计算节点提供容量和性能可弹性扩展的高性能共享存储。腾讯云文件存储的管理界面简单、易使用,可实现对现有应用的无缝集成;按实际用量付费,为您节约成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档