參考:https://blog.csdn.net/hiqingtian/article/details/79413471php
https://blog.csdn.net/sinat_40399893/article/details/80548374html
一、什麼是FastDFS。linux
FastDFS是用c語言編寫的一款開源的分佈式文件系統。FastDFS爲互聯網量身定製,充分考慮了冗餘備份、負載均衡、線性擴容等機制,並注重高可用、高性能等指標,使用FastDFS很容易搭建一套高性能的文件服務器集羣提供文件上傳、下載等服務。nginx
二、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稱爲存儲服務器。 c++
以下圖:git
2.一、Tracker 集羣。
FastDFS集羣中的Tracker server能夠有多臺,Tracker server之間是相互平等關係同時提供服務,Tracker server不存在單點故障。客戶端請求Tracker server採用輪詢方式,若是請求的tracker沒法提供服務則換另外一個tracker。github
2.二、Storage集羣。
Storage集羣採用了分組存儲方式。storage集羣由一個或多個組構成,集羣存儲總容量爲集羣中全部組的存儲容量之和。一個組由一臺或多臺存儲服務器組成,組內的Storage server之間是平等關係,不一樣組的Storage server之間不會相互通訊,同組內的Storage server之間會相互鏈接進行文件同步,從而保證同組內每一個storage上的文件徹底一致的。一個組的存儲容量爲該組內存儲服務器容量最小的那個,因而可知組內存儲服務器的軟硬件配置最好是一致的。
採用分組存儲方式的好處是靈活、可控性較強。好比上傳文件時,能夠由客戶端直接指定上傳到的組也能夠由tracker進行調度選擇。一個分組的存儲服務器訪問壓力較大時,能夠在該組增長存儲服務器來擴充服務能力(縱向擴容)。當系統容量不足時,能夠增長組來擴充存儲容量(橫向擴容)。 web
2.三、Storage狀態收集。
Storage server會鏈接集羣中全部的Tracker server,定時向他們報告本身的狀態,包括磁盤剩餘空間、文件同步情況、文件上傳下載次數等統計信息。apache
2.四、文件上傳流程。vim
客戶端上傳文件後存儲服務器將文件ID返回給客戶端,此文件ID用於之後訪問該文件的索引信息。文件索引信息包括:組名,虛擬磁盤路徑,數據兩級目錄,文件名。
a、組名:文件上傳後所在的storage組名稱,在文件上傳成功後有storage服務器返回,須要客戶端自行保存。
b、虛擬磁盤路徑:storage配置的虛擬路徑,與磁盤選項store_path*對應。若是配置了store_path0則是M00,若是配置了store_path1則是M01,以此類推。
c、數據兩級目錄:storage服務器在每一個虛擬磁盤路徑下建立的兩級目錄,用於存儲數據文件。
d、文件名:與文件上傳時不一樣。是由存儲服務器根據特定信息生成,文件名包含:源存儲服務器IP地址、文件建立時間戳、文件大小、隨機數和文件拓展名等信息。
2.五、文件下載流程。
tracker根據請求的文件路徑即文件ID 來快速定義文件。
好比請求下邊的文件:
a、經過組名tracker可以很快的定位到客戶端須要訪問的存儲服務器組是group1,並選擇合適的存儲服務器提供客戶端訪問。
b、存儲服務器根據「文件存儲虛擬磁盤路徑」和「數據文件兩級目錄」能夠很快定位到文件所在目錄,並根據文件名找到客戶端須要訪問的文件。
三、FastDFS+Nginx實現文件服務器。搭建小型的,簡單的fastdfs圖片服務器,不是高可用的。
3.一、FastDFS--tracker安裝。
3.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.七、啓動。
/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]#
這個顯示,說明已經本身自啓動了。
四、FastDFS--storage安裝。
由於這裏搭建的是小型的,將tracker、storage部署到了一臺機器上面,因此storage前三步驟都和tracker同樣,那麼這裏也就是不用安裝了,若是在不一樣的機器上面,就須要再次安裝部署的。注意,這裏使用的是tracker和storage使用相同的安裝包。
4.一、安裝libevent
同tracker安裝。
4.二、安裝libfastcommon
同tracker安裝。
4.三、storage編譯安裝
同tracker編譯安裝。
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.五、啓動。
/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
五、FastDFS 和nginx整合。
5.一、在tracker上安裝nginx。在每一個tracker上安裝nginx,的主要目的是作負載均衡及實現高可用。若是隻有一臺tracker服務器能夠不配置nginx。
這裏就先不安裝tracker服務器nginx的。
5.二、在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.三、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的安裝參考:http://www.javashuo.com/article/p-btyfrlon-bw.html
步驟以下所示:
[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.四、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 }
六、上傳圖片測試。
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。
爲了外部能夠訪問,能夠將FastDFS的端口號添加到防火牆能夠訪問。避免出現防火牆拒絕訪問的狀況出現。
[root@localhost ~]# vim /etc/sysconfig/iptables
1 複製這句話,將fastdfs的端口號替換22便可 2 -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
待續......