FastDFS 分布式文件系統部署實戰及基本使用


              FastDFS 分布式文件系統部署實戰及基本使用

                                           作者:尹正傑

版權聲明:原創作品,謝絕轉載!否則將追究法律責任。

 

  FastDFS是一個開源的高性能分布式文件系統。它的主要功能包括:文件存儲,文件同步和文件訪問(文件上傳和文件下載),它可以解決高容量和負載平衡問題。FastDFS應滿足基於照片共享站點和視頻共享站點等文件服務的網站的要求。它的應用場景非常適合存儲大於4k小於500M左右的音頻,圖片,APP安裝包等二進制文件。FastDFS典型用戶有UC,支付寶,京東,飛信,58同城,51CTO等等。GitHub地址為:https://github.com/happyfish100/fastdfs

 

 

一.FastDFS基礎知識

1>.什么是FastDFS

  FastDFS是一個開源的輕量級分布式文件系統。它解決了大數據量存儲和負載均衡等問題。特別適合以中小文件(建議范圍:4KB < file_size <500MB)為載體的在線服務,如相冊網站、視頻網站等等。在UC基於FastDFS開發向用戶提供了:網盤,社區,廣告和應用下載等業務的存儲服務。

  FastDFS是一款開源的輕量級分布式文件系統純C實現,支持Linux、FreeBSD等UNIX系統類google FS,不是通用的文件系統,只能通過專有API訪問,目前提供了C、Java和PHP API為互聯網應用量身定做,解決大容量文件存儲問題,追求高性能和高擴展性FastDFS可以看做是基於文件的key value pair存儲系統,稱作分布式文件存儲服務更為合適。

2>.FastDFS的特性

  2.1>.文件不分塊存儲,上傳的文件和OS文件系統中的文件一一對應;

  2.2>.支持相同內容的文件只保存一份,節約磁盤空間;

  2.3>.下載文件支持HTTP協議,可以使用內置Web Server,也可以和其他Web Server配合使用;

  2.4>.支持在線擴容;

  2.5>.支持主從文件;

  2.6>.存儲服務器上可以保存文件屬性(meta-data)V2.0網絡通信采用libevent,支持大並發訪問,整體性能更好;

3>.FastDFS架構 

FastDFS相關概念

FastDFS服務端有三個角色:跟蹤服務器(tracker server)、存儲服務器(storage server)和客戶端(client)。

tracker server:跟蹤服務器,主要做調度工作,起負載均衡的作用。在內存中記錄集群中所有存儲組和存儲服務器的狀態信息,是客戶端和數據服務器交互的樞紐。相比GFS中的master更為精簡,不記錄文件索引信息,占用的內存量很少。

Tracker是FastDFS的協調者,負責管理所有的storage server和group,每個storage在啟動后會連接Tracker,告知自己所屬的group等信息,並保持周期性的心跳,tracker根據storage的心跳信息,建立group==>[storage server list]的映射表。

Tracker需要管理的元信息很少,會全部存儲在內存中;另外tracker上的元信息都是由storage匯報的信息生成的,本身不需要持久化任何數據,這樣使得tracker非常容易擴展,直接增加tracker機器即可擴展為tracker cluster來服務,cluster里每個tracker之間是完全對等的,所有的tracker都接受stroage的心跳信息,生成元數據信息來提供讀寫服務。

storage server:存儲服務器(又稱:存儲節點或數據服務器),文件和文件屬性(meta data)都保存到存儲服務器上。Storage server直接利用OS的文件系統調用管理文件。

Storage server(后簡稱storage)以組(卷,group或volume)為單位組織,一個group內包含多台storage機器,數據互為備份,存儲空間以group內容量最小的storage為准,所以建議group內的多個storage盡量配置相同,以免造成存儲空間的浪費。

以group為單位組織存儲能方便的進行應用隔離、負載均衡、副本數定制(group內storage server數量即為該group的副本數),比如將不同應用數據存到不同的group就能隔離應用數據,同時還可根據應用的訪問特性來將應用分配到不同的group來做負載均衡;缺點是group的容量受單機存儲容量的限制,同時當group內有機器壞掉時,數據恢復只能依賴group內地其他機器,使得恢復時間會很長。

group內每個storage的存儲依賴於本地文件系統,storage可配置多個數據存儲目錄,比如有10塊磁盤,分別掛載在/data/disk1-/data/disk10,則可將這10個目錄都配置為storage的數據存儲目錄。

storage接受到寫文件請求時,會根據配置好的規則(后面會介紹),選擇其中一個存儲目錄來存儲文件。為了避免單個目錄下的文件數太多,在storage第一次啟動時,會在每個數據存儲目錄里創建2級子目錄,每級256個,總共65536個文件,新寫的文件會以hash的方式被路由到其中某個子目錄下,然后將文件數據直接作為一個本地文件存儲到該目錄中。

client:客戶端,作為業務請求的發起方,通過專有接口,使用TCP/IP協議與跟蹤器服務器或存儲節點進行數據交互。FastDFS向使用者提供基本文件訪問接口,比如upload、download、append、delete等,以客戶端庫的方式提供給用戶使用。

另外兩個概念:

group :組, 也可稱為卷。 同組內服務器上的文件是完全相同的 ,同一組內的storage server之間是對等的, 文件上傳、 刪除等操作可以在任意一台storage server上進行 。

meta data :文件相關屬性,鍵值對( Key Value Pair) 方式,如:width=1024,heigth=768
FastDFS相關概念
FastDFS有兩個角色:跟蹤器和存儲。
    跟蹤服務器(Tracker)負責文件訪問的調度和負載平衡。在內存中記錄集群中group(同一個group的數據是相同的,和raid1原理很相似,group是支持在線添加的,各個group之間並不互相通信!它們只和追蹤服務器通信!)和storage server的狀態信息,是連接client和storage server的樞紐。因為相關信息全部在內存中,Tracker server的性能非常高,一個較大的集群(比如上百個group)中有3台就足夠了。
    
  存儲服務器(Storage)負責存儲文件及其功能是文件管理,包括:文件存儲,文件同步,提供文件訪問接口。它還管理元數據(meta data),這些元數據表示為文件的鍵值對。例如:width
= 1024,鍵為“width”,值為“1024”。 跟蹤器和存儲器包含一個或多個服務器。可以隨時向集群中添加或刪除跟蹤器或存儲集群中的服務器,而不會影響在線服務。跟蹤器集群中的服務器是對等的。 由文件卷/組組織的storarge服務器以獲得高容量。存儲系統包含一個或多個卷,這些卷的文件在這些卷中是獨立的。整個存儲系統的容量等於所有容量的總和。文件卷包含一個或多個存儲服務器,這些服務器的文件在這些服務器中相同。文件卷中的服務器相互備份,所有這些服務器都是負載平衡的。將存儲服務器添加到卷時,此卷中已存在的文件會自動復制到此新服務器,完成此復制后,系統將在線將此服務器切換為提供存儲服務。 當整個存儲容量不足時,您可以添加一個或多個卷以擴展存儲容量。為此,您需要添加一個或多個存儲服務器。 文件的標識由兩部分組成:卷名和文件名。

Tracker相當於FastDFS的大腦,不論是上傳還是下載都是通過tracker來分配資源;客戶端一般可以使用ngnix等靜態服務器來調用或者做一部分的緩存;存儲服務器內部分為卷(或者叫做組),卷於卷之間是平行的關系,可以根據資源的使用情況隨時增加,卷內服務器文件相互同步備份,以達到容災的目的。

 

4>.FastDFS上傳文件

  首先客戶端請求Tracker服務獲取到存儲服務器的ip地址和端口,然后客戶端根據返回的IP地址和端口號請求上傳文件,存儲服務器接收到請求后生產文件,並且將文件內容寫入磁盤並返回給客戶端file_id、路徑信息、文件名等信息,客戶端保存相關信息上傳完畢。

內部機制如下:

1、選擇tracker server

當集群中不止一個tracker server時,由於tracker之間是完全對等的關系,客戶端在upload文件時可以任意選擇一個trakcer。
選擇存儲的group
當tracker接收到upload file的請求時,會為該文件分配一個可以存儲該文件的group,支持如下選擇group的規則:

1、Round robin,所有的group間輪詢
2、Specified group,指定某一個確定的group
3、Load balance,剩余存儲空間多多group優先
2、選擇storage server

當選定group后,tracker會在group內選擇一個storage server給客戶端,支持如下選擇storage的規則:

1、Round robin,在group內的所有storage間輪詢
2、First server ordered by ip,按ip排序
3、First server ordered by priority,按優先級排序(優先級在storage上配置)
3、選擇storage path

當分配好storage server后,客戶端將向storage發送寫文件請求,storage將會為文件分配一個數據存儲目錄,支持如下規則:

1、Round robin,多個存儲目錄間輪詢
2、剩余存儲空間最多的優先
4、生成Fileid

選定存儲目錄之后,storage會為文件生一個Fileid,由storage server ip、文件創建時間、文件大小、文件crc32和一個隨機數拼接而成,然后將這個二進制串進行base64編碼,轉換為可打印的字符串。
選擇兩級目錄
當選定存儲目錄之后,storage會為文件分配一個fileid,每個存儲目錄下有兩級256*256的子目錄,storage會按文件fileid進行兩次hash(猜測),路由到其中一個子目錄,然后將文件以fileid為文件名存儲到該子目錄下。

5、生成文件名

當文件存儲到某個子目錄后,即認為該文件存儲成功,接下來會為該文件生成一個文件名,文件名由group、存儲目錄、兩級子目錄、fileid、文件后綴名(由客戶端指定,主要用於區分文件類型)拼接而成。
FastDFS內部機制詳解

 

5>.FastDFS下載文件

   客戶端帶上文件名信息請求Tracker服務獲取到存儲服務器的ip地址和端口,然后客戶端根據返回的IP地址和端口號請求下載文件,存儲服務器接收到請求后返回文件給客戶端。

跟upload file一樣,在download file時客戶端可以選擇任意tracker server。tracker發送download請求給某個tracker,必須帶上文件名信息,tracke從文件名中解析出文件的group、大小、創建時間等信息,然后為該請求選擇一個storage用來服務讀請求。由於group內的文件同步時在后台異步進行的,所以有可能出現在讀到時候,文件還沒有同步到某些storage server上,為了盡量避免訪問到這樣的storage,tracker按照如下規則選擇group內可讀的storage。

1、該文件上傳到的源頭storage - 源頭storage只要存活着,肯定包含這個文件,源頭的地址被編碼在文件名中。
2、文件創建時間戳==storage被同步到的時間戳 且(當前時間-文件創建時間戳) > 文件同步最大時間(如5分鍾) - 文件創建后,認為經過最大同步時間后,肯定已經同步到其他storage了。
3、文件創建時間戳 < storage被同步到的時間戳。 - 同步時間戳之前的文件確定已經同步了
4、(當前時間-文件創建時間戳) > 同步延遲閥值(如一天)。 - 經過同步延遲閾值時間,認為文件肯定已經同步了。
FastDFS下載內部機制詳解 

6>.精巧的文件ID-FID

  說到下載就不得不提文件索引(又稱:FID)的精巧設計了。文件索引結構如下圖,是客戶端上傳文件后存儲服務器返回給客戶端,用於以后訪問該文件的索引信息。文件索引信息包括:組名,虛擬磁盤路徑,數據兩級目錄,文件名。

組名:文件上傳后所在的存儲組名稱,在文件上傳成功后有存儲服務器返回,需要客戶端自行保存。

虛擬磁盤路徑:存儲服務器配置的虛擬路徑,與磁盤選項store_path*對應。

數據兩級目錄:存儲服務器在每個虛擬磁盤路徑下創建的兩級目錄,用於存儲數據文件。

文件名:與文件上傳時不同。是由存儲服務器根據特定信息生成,文件名包含:源存儲服務器IP地址、文件創建時間戳、文件大小、隨機數和文件拓展名等信息。

7>.快速定位文件

知道FastDFS FID的組成后,我們來看看FastDFS是如何通過這個精巧的FID定位到需要訪問的文件。

1、通過組名tracker能夠很快的定位到客戶端需要訪問的存儲服務器組,並將選擇合適的存儲服務器提供客戶端訪問;

2、存儲服務器根據“文件存儲虛擬磁盤路徑”和“數據文件兩級目錄”可以很快定位到文件所在目錄,並根據文件名找到客戶端需要訪問的文件。

 

  以上信息引用自:https://www.cnblogs.com/ityouknow/p/8240976.html

 

二.安裝libfastcommon類庫(安裝FastDFS必須先安裝libfastcommon類庫,否則會導致報錯)

1>.查看happyfish100/libfastcommon地址

2>.下載libfastcommon安裝包 

[root@node101 ~]# yum -y install gcc gcc-c++ libstdc++-devel pcre-devel zlib-devel wget make
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.jdcloud.com
 * extras: mirror.jdcloud.com
 * updates: mirror.jdcloud.com
base                                                                                                                                                                                        | 3.6 kB  00:00:00     
extras                                                                                                                                                                                      | 3.4 kB  00:00:00     
myglusterfs                                                                                                                                                                                 | 2.9 kB  00:00:00     
mysql-connectors-community                                                                                                                                                                  | 2.5 kB  00:00:00     
mysql-tools-community                                                                                                                                                                       | 2.5 kB  00:00:00     
mysql80-community                                                                                                                                                                           | 2.5 kB  00:00:00     
updates                                                                                                                                                                                     | 3.4 kB  00:00:00     
Package gcc-4.8.5-36.el7.x86_64 already installed and latest version
Package wget-1.14-18.el7.x86_64 already installed and latest version
Package 1:make-3.82-23.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.8.5-36.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-36.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                                 Arch                                           Version                                                 Repository                                    Size
===================================================================================================================================================================================================================
Installing:
 gcc-c++                                                 x86_64                                         4.8.5-36.el7                                            base                                         7.2 M
 libstdc++-devel                                         x86_64                                         4.8.5-36.el7                                            base                                         1.5 M
 pcre-devel                                              x86_64                                         8.32-17.el7                                             base                                         480 k
 zlib-devel                                              x86_64                                         1.2.7-18.el7                                            base                                          50 k

Transaction Summary
===================================================================================================================================================================================================================
Install  4 Packages

Total download size: 9.2 M
Installed size: 26 M
Downloading packages:
(1/4): libstdc++-devel-4.8.5-36.el7.x86_64.rpm                                                                                                                                              | 1.5 MB  00:00:01     
(2/4): zlib-devel-1.2.7-18.el7.x86_64.rpm                                                                                                                                                   |  50 kB  00:00:01     
(3/4): pcre-devel-8.32-17.el7.x86_64.rpm                                                                                                                                                    | 480 kB  00:00:03     
(4/4): gcc-c++-4.8.5-36.el7.x86_64.rpm                                                                                                                                                      | 7.2 MB  00:00:10     
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                              895 kB/s | 9.2 MB  00:00:10     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libstdc++-devel-4.8.5-36.el7.x86_64                                                                                                                                                             1/4 
  Installing : gcc-c++-4.8.5-36.el7.x86_64                                                                                                                                                                     2/4 
  Installing : zlib-devel-1.2.7-18.el7.x86_64                                                                                                                                                                  3/4 
  Installing : pcre-devel-8.32-17.el7.x86_64                                                                                                                                                                   4/4 
  Verifying  : gcc-c++-4.8.5-36.el7.x86_64                                                                                                                                                                     1/4 
  Verifying  : pcre-devel-8.32-17.el7.x86_64                                                                                                                                                                   2/4 
  Verifying  : zlib-devel-1.2.7-18.el7.x86_64                                                                                                                                                                  3/4 
  Verifying  : libstdc++-devel-4.8.5-36.el7.x86_64                                                                                                                                                             4/4 

Installed:
  gcc-c++.x86_64 0:4.8.5-36.el7                    libstdc++-devel.x86_64 0:4.8.5-36.el7                    pcre-devel.x86_64 0:8.32-17.el7                    zlib-devel.x86_64 0:1.2.7-18.el7                   

Complete!
[root@node101 ~]# 
[root@node101 ~]# yum -y install gcc gcc-c++ libstdc++-devel pcre-devel zlib-devel wget make          #安裝依賴軟件
[root@node101 ~]# wget https://github.com/happyfish100/libfastcommon/archive/V1.0.39.tar.gz
--2019-02-19 17:38:02--  https://github.com/happyfish100/libfastcommon/archive/V1.0.39.tar.gz
Resolving github.com (github.com)... 52.74.223.119, 13.229.188.59, 13.250.177.223
Connecting to github.com (github.com)|52.74.223.119|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/happyfish100/libfastcommon/tar.gz/V1.0.39 [following]
--2019-02-19 17:38:03--  https://codeload.github.com/happyfish100/libfastcommon/tar.gz/V1.0.39
Resolving codeload.github.com (codeload.github.com)... 54.251.140.56, 13.250.162.133, 13.229.189.0
Connecting to codeload.github.com (codeload.github.com)|54.251.140.56|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘V1.0.39.tar.gz’

    [      <=>                                                                                                                                                                 ] 153,951     75.6KB/s   in 2.0s   

2019-02-19 17:38:07 (75.6 KB/s) - ‘V1.0.39.tar.gz’ saved [153951]

[root@node101 ~]# 
[root@node101 ~]# ls
glusterfs-rhel8.repo  V1.0.39.tar.gz
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# wget https://github.com/happyfish100/libfastcommon/archive/V1.0.39.tar.gz 

 

3>. 安裝libfastcommon(本實驗使用的是CentOS 7.6,兩台配置一樣的虛擬機測試,因此2台虛擬機都需要做同的操作)

[root@node101 ~]# tar -zxf V1.0.39.tar.gz -C /yinzhengjie/softwares/
[root@node101 ~]# 
[root@node101 ~]# ll /yinzhengjie/softwares/libfastcommon-1.0.39/
total 40
drwxrwxr-x 2 root root 4096 Jul 31  2018 doc
-rw-rw-r-- 1 root root 9099 Jul 31  2018 HISTORY
-rw-rw-r-- 1 root root  566 Jul 31  2018 INSTALL
-rw-rw-r-- 1 root root 1607 Jul 31  2018 libfastcommon.spec
-rwxrwxr-x 1 root root 3248 Jul 31  2018 make.sh
drwxrwxr-x 2 root root 4096 Jul 31  2018 php-fastcommon
-rw-rw-r-- 1 root root 2763 Jul 31  2018 README
drwxrwxr-x 3 root root 4096 Jul 31  2018 src
[root@node101 ~]# 
[root@node101 ~]# cd /yinzhengjie/softwares/libfastcommon-1.0.39/
[root@node101 libfastcommon-1.0.39]# 
[root@node101 libfastcommon-1.0.39]# ./make.sh 
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o hash.o hash.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o chain.o chain.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o shared_func.o shared_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o ini_file_reader.o ini_file_reader.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o logger.o logger.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o sockopt.o sockopt.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o base64.o base64.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o sched_thread.o sched_thread.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o http_func.o http_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o md5.o md5.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o pthread_func.o pthread_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o local_ip_func.o local_ip_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o avl_tree.o avl_tree.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o ioevent.o ioevent.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o ioevent_loop.o ioevent_loop.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_task_queue.o fast_task_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_timer.o fast_timer.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o process_ctrl.o process_ctrl.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_mblock.o fast_mblock.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o connection_pool.o connection_pool.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_mpool.o fast_mpool.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_allocator.o fast_allocator.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_buffer.o fast_buffer.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o multi_skiplist.o multi_skiplist.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o flat_skiplist.o flat_skiplist.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o system_info.o system_info.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_blocked_queue.o fast_blocked_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o id_generator.o id_generator.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o char_converter.o char_converter.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o char_convert_loader.o char_convert_loader.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o common_blocked_queue.o common_blocked_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o multi_socket_client.o multi_socket_client.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o skiplist_set.o skiplist_set.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o hash.lo hash.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o chain.lo chain.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o shared_func.lo shared_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o ini_file_reader.lo ini_file_reader.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o logger.lo logger.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o sockopt.lo sockopt.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o base64.lo base64.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o sched_thread.lo sched_thread.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o http_func.lo http_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o md5.lo md5.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o pthread_func.lo pthread_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o local_ip_func.lo local_ip_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o avl_tree.lo avl_tree.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o ioevent.lo ioevent.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o ioevent_loop.lo ioevent_loop.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_task_queue.lo fast_task_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_timer.lo fast_timer.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o process_ctrl.lo process_ctrl.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_mblock.lo fast_mblock.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o connection_pool.lo connection_pool.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_mpool.lo fast_mpool.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_allocator.lo fast_allocator.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_buffer.lo fast_buffer.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o multi_skiplist.lo multi_skiplist.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o flat_skiplist.lo flat_skiplist.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o system_info.lo system_info.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_blocked_queue.lo fast_blocked_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o id_generator.lo id_generator.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o char_converter.lo char_converter.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o char_convert_loader.lo char_convert_loader.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o common_blocked_queue.lo common_blocked_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o multi_socket_client.lo multi_socket_client.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o skiplist_set.lo skiplist_set.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -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 fast_mpool.lo fast_allocator.lo fast_buffer.lo multi_skiplist.lo flat_skiplist.lo system_info.lo fast_blocked_queue.lo id_generator.lo char_converter.lo char_convert_loader.lo common_blocked_queue.lo multi_socket_client.lo skiplist_set.lo -lm -lpthread
ar rcs libfastcommon.a hash.o chain.o shared_func.o ini_file_reader.o logger.o sockopt.o base64.o sched_thread.o http_func.o md5.o pthread_func.o local_ip_func.o avl_tree.o ioevent.o ioevent_loop.o fast_task_queue.o fast_timer.o process_ctrl.o fast_mblock.o connection_pool.o fast_mpool.o fast_allocator.o fast_buffer.o multi_skiplist.o flat_skiplist.o system_info.o fast_blocked_queue.o id_generator.o char_converter.o char_convert_loader.o common_blocked_queue.o multi_socket_client.o skiplist_set.o
[root@node101 libfastcommon-1.0.39]# echo $?
0
[root@node101 libfastcommon-1.0.39]# 
[root@node101 libfastcommon-1.0.39]# ./make.sh
[root@node101 libfastcommon-1.0.39]# ./make.sh install
mkdir -p /usr/lib64
mkdir -p /usr/lib
mkdir -p /usr/include/fastcommon
install -m 755 libfastcommon.so /usr/lib64
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_define.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 fast_mpool.h fast_allocator.h fast_buffer.h skiplist.h multi_skiplist.h flat_skiplist.h skiplist_common.h system_info.h fast_blocked_queue.h php7_ext_wrapper.h id_generator.h char_converter.h char_convert_loader.h common_blocked_queue.h multi_socket_client.h skiplist_set.h fc_list.h /usr/include/fastcommon
if [ ! -e /usr/lib/libfastcommon.so ]; then ln -s /usr/lib64/libfastcommon.so /usr/lib/libfastcommon.so; fi
[root@node101 libfastcommon-1.0.39]# 
[root@node101 libfastcommon-1.0.39]# ./make.sh install
[root@node102 ~]# yum -y install gcc gcc-c++ libstdc++-devel pcre-devel zlib-devel wget make
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.huaweicloud.com
base                                                                                                                                                                                        | 3.6 kB  00:00:00     
extras                                                                                                                                                                                      | 3.4 kB  00:00:00     
myglusterfs                                                                                                                                                                                 | 2.9 kB  00:00:00     
updates                                                                                                                                                                                     | 3.4 kB  00:00:00     
Package gcc-4.8.5-36.el7.x86_64 already installed and latest version
Package 1:make-3.82-23.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.8.5-36.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-36.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
---> Package wget.x86_64 0:1.14-18.el7 will be installed
---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                                 Arch                                           Version                                                 Repository                                    Size
===================================================================================================================================================================================================================
Installing:
 gcc-c++                                                 x86_64                                         4.8.5-36.el7                                            base                                         7.2 M
 libstdc++-devel                                         x86_64                                         4.8.5-36.el7                                            base                                         1.5 M
 pcre-devel                                              x86_64                                         8.32-17.el7                                             base                                         480 k
 wget                                                    x86_64                                         1.14-18.el7                                             base                                         547 k
 zlib-devel                                              x86_64                                         1.2.7-18.el7                                            base                                          50 k

Transaction Summary
===================================================================================================================================================================================================================
Install  5 Packages

Total download size: 9.7 M
Installed size: 28 M
Downloading packages:
(1/5): libstdc++-devel-4.8.5-36.el7.x86_64.rpm                                                                                                                                              | 1.5 MB  00:00:02     
(2/5): wget-1.14-18.el7.x86_64.rpm                                                                                                                                                          | 547 kB  00:00:00     
(3/5): pcre-devel-8.32-17.el7.x86_64.rpm                                                                                                                                                    | 480 kB  00:00:01     
(4/5): zlib-devel-1.2.7-18.el7.x86_64.rpm                                                                                                                                                   |  50 kB  00:00:00     
(5/5): gcc-c++-4.8.5-36.el7.x86_64.rpm                                                                                                                                                      | 7.2 MB  00:00:08     
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                              1.1 MB/s | 9.7 MB  00:00:08     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libstdc++-devel-4.8.5-36.el7.x86_64                                                                                                                                                             1/5 
  Installing : gcc-c++-4.8.5-36.el7.x86_64                                                                                                                                                                     2/5 
  Installing : zlib-devel-1.2.7-18.el7.x86_64                                                                                                                                                                  3/5 
  Installing : wget-1.14-18.el7.x86_64                                                                                                                                                                         4/5 
  Installing : pcre-devel-8.32-17.el7.x86_64                                                                                                                                                                   5/5 
  Verifying  : gcc-c++-4.8.5-36.el7.x86_64                                                                                                                                                                     1/5 
  Verifying  : pcre-devel-8.32-17.el7.x86_64                                                                                                                                                                   2/5 
  Verifying  : wget-1.14-18.el7.x86_64                                                                                                                                                                         3/5 
  Verifying  : zlib-devel-1.2.7-18.el7.x86_64                                                                                                                                                                  4/5 
  Verifying  : libstdc++-devel-4.8.5-36.el7.x86_64                                                                                                                                                             5/5 

Installed:
  gcc-c++.x86_64 0:4.8.5-36.el7           libstdc++-devel.x86_64 0:4.8.5-36.el7           pcre-devel.x86_64 0:8.32-17.el7           wget.x86_64 0:1.14-18.el7           zlib-devel.x86_64 0:1.2.7-18.el7          

Complete!
[root@node102 ~]# 
[root@node102 ~]# yum -y install gcc gcc-c++ libstdc++-devel pcre-devel zlib-devel wget make          #安裝依賴軟件
[root@node102 ~]# wget https://github.com/happyfish100/libfastcommon/archive/V1.0.39.tar.gz
--2019-02-19 17:47:30--  https://github.com/happyfish100/libfastcommon/archive/V1.0.39.tar.gz
Resolving github.com (github.com)... 13.229.188.59, 13.250.177.223, 52.74.223.119
Connecting to github.com (github.com)|13.229.188.59|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/happyfish100/libfastcommon/tar.gz/V1.0.39 [following]
--2019-02-19 17:47:31--  https://codeload.github.com/happyfish100/libfastcommon/tar.gz/V1.0.39
Resolving codeload.github.com (codeload.github.com)... 54.251.140.56, 13.229.189.0, 13.250.162.133
Connecting to codeload.github.com (codeload.github.com)|54.251.140.56|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘V1.0.39.tar.gz’

    [   <=>                                                                                                                                                                    ] 153,951      264KB/s   in 0.6s   

2019-02-19 17:47:32 (264 KB/s) - ‘V1.0.39.tar.gz’ saved [153951]

[root@node102 ~]# 
[root@node102 ~]# wget https://github.com/happyfish100/libfastcommon/archive/V1.0.39.tar.gz
[root@node102 ~]# mkdir -pv /yinzhengjie/softwares
mkdir: created directory ‘/yinzhengjie’
mkdir: created directory ‘/yinzhengjie/softwares’
[root@node102 ~]# 
[root@node102 ~]# tar -zxf V1.0.39.tar.gz -C /yinzhengjie/softwares/
[root@node102 ~]# 
[root@node102 ~]# ll /yinzhengjie/softwares/libfastcommon-1.0.39/
total 40
drwxrwxr-x 2 root root 4096 Jul 31  2018 doc
-rw-rw-r-- 1 root root 9099 Jul 31  2018 HISTORY
-rw-rw-r-- 1 root root  566 Jul 31  2018 INSTALL
-rw-rw-r-- 1 root root 1607 Jul 31  2018 libfastcommon.spec
-rwxrwxr-x 1 root root 3248 Jul 31  2018 make.sh
drwxrwxr-x 2 root root 4096 Jul 31  2018 php-fastcommon
-rw-rw-r-- 1 root root 2763 Jul 31  2018 README
drwxrwxr-x 3 root root 4096 Jul 31  2018 src
[root@node102 ~]# 
[root@node102 ~]# cd /yinzhengjie/softwares/libfastcommon-1.0.39/
[root@node102 libfastcommon-1.0.39]# 
[root@node102 libfastcommon-1.0.39]# ./make.sh 
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o hash.o hash.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o chain.o chain.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o shared_func.o shared_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o ini_file_reader.o ini_file_reader.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o logger.o logger.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o sockopt.o sockopt.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o base64.o base64.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o sched_thread.o sched_thread.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o http_func.o http_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o md5.o md5.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o pthread_func.o pthread_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o local_ip_func.o local_ip_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o avl_tree.o avl_tree.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o ioevent.o ioevent.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o ioevent_loop.o ioevent_loop.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_task_queue.o fast_task_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_timer.o fast_timer.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o process_ctrl.o process_ctrl.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_mblock.o fast_mblock.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o connection_pool.o connection_pool.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_mpool.o fast_mpool.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_allocator.o fast_allocator.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_buffer.o fast_buffer.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o multi_skiplist.o multi_skiplist.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o flat_skiplist.o flat_skiplist.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o system_info.o system_info.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o fast_blocked_queue.o fast_blocked_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o id_generator.o id_generator.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o char_converter.o char_converter.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o char_convert_loader.o char_convert_loader.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o common_blocked_queue.o common_blocked_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o multi_socket_client.o multi_socket_client.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o skiplist_set.o skiplist_set.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o hash.lo hash.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o chain.lo chain.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o shared_func.lo shared_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o ini_file_reader.lo ini_file_reader.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o logger.lo logger.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o sockopt.lo sockopt.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o base64.lo base64.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o sched_thread.lo sched_thread.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o http_func.lo http_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o md5.lo md5.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o pthread_func.lo pthread_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o local_ip_func.lo local_ip_func.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o avl_tree.lo avl_tree.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o ioevent.lo ioevent.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o ioevent_loop.lo ioevent_loop.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_task_queue.lo fast_task_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_timer.lo fast_timer.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o process_ctrl.lo process_ctrl.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_mblock.lo fast_mblock.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o connection_pool.lo connection_pool.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_mpool.lo fast_mpool.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_allocator.lo fast_allocator.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_buffer.lo fast_buffer.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o multi_skiplist.lo multi_skiplist.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o flat_skiplist.lo flat_skiplist.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o system_info.lo system_info.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o fast_blocked_queue.lo fast_blocked_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o id_generator.lo id_generator.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o char_converter.lo char_converter.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o char_convert_loader.lo char_convert_loader.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o common_blocked_queue.lo common_blocked_queue.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o multi_socket_client.lo multi_socket_client.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -fPIC -o skiplist_set.lo skiplist_set.c  
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -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 fast_mpool.lo fast_allocator.lo fast_buffer.lo multi_skiplist.lo flat_skiplist.lo system_info.lo fast_blocked_queue.lo id_generator.lo char_converter.lo char_convert_loader.lo common_blocked_queue.lo multi_socket_client.lo skiplist_set.lo -lm -lpthread
ar rcs libfastcommon.a hash.o chain.o shared_func.o ini_file_reader.o logger.o sockopt.o base64.o sched_thread.o http_func.o md5.o pthread_func.o local_ip_func.o avl_tree.o ioevent.o ioevent_loop.o fast_task_queue.o fast_timer.o process_ctrl.o fast_mblock.o connection_pool.o fast_mpool.o fast_allocator.o fast_buffer.o multi_skiplist.o flat_skiplist.o system_info.o fast_blocked_queue.o id_generator.o char_converter.o char_convert_loader.o common_blocked_queue.o multi_socket_client.o skiplist_set.o
[root@node102 libfastcommon-1.0.39]# 
[root@node102 libfastcommon-1.0.39]# ./make.sh
[root@node102 libfastcommon-1.0.39]# ./make.sh install
mkdir -p /usr/lib64
mkdir -p /usr/lib
mkdir -p /usr/include/fastcommon
install -m 755 libfastcommon.so /usr/lib64
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_define.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 fast_mpool.h fast_allocator.h fast_buffer.h skiplist.h multi_skiplist.h flat_skiplist.h skiplist_common.h system_info.h fast_blocked_queue.h php7_ext_wrapper.h id_generator.h char_converter.h char_convert_loader.h common_blocked_queue.h multi_socket_client.h skiplist_set.h fc_list.h /usr/include/fastcommon
if [ ! -e /usr/lib/libfastcommon.so ]; then
[root@node102 libfastcommon-1.0.39]# ./make.sh install

 

三.部署FastDFS

1>.查看happyfish100/fastdfs地址

 

2>.選擇FastDFS的版本

 

3>.安裝FastDFS

[root@node101 ~]# wget https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz
--2019-02-19 17:55:08--  https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz
Resolving github.com (github.com)... 13.229.188.59, 13.250.177.223, 52.74.223.119
Connecting to github.com (github.com)|13.229.188.59|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/happyfish100/fastdfs/tar.gz/V5.11 [following]
--2019-02-19 17:55:09--  https://codeload.github.com/happyfish100/fastdfs/tar.gz/V5.11
Resolving codeload.github.com (codeload.github.com)... 13.250.162.133, 54.251.140.56, 13.229.189.0
Connecting to codeload.github.com (codeload.github.com)|13.250.162.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘V5.11.tar.gz’

    [   <=>                                                                                                                                                                    ] 336,939      480KB/s   in 0.7s   

2019-02-19 17:55:11 (480 KB/s) - ‘V5.11.tar.gz’ saved [336939]

[root@node101 ~]# 
[root@node101 ~]# wget https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz
[root@node101 ~]# tar -zxf V5.11.tar.gz -C /yinzhengjie/softwares/
[root@node101 ~]# 
[root@node101 ~]# ll /yinzhengjie/softwares/fastdfs-5.11/
total 136
drwxrwxr-x 3 root root  4096 Jun  3  2017 client
drwxrwxr-x 2 root root  4096 Jun  3  2017 common
drwxrwxr-x 2 root root  4096 Jun  3  2017 conf
-rw-rw-r-- 1 root root 35067 Jun  3  2017 COPYING-3_0.txt
-rw-rw-r-- 1 root root  3171 Jun  3  2017 fastdfs.spec
-rw-rw-r-- 1 root root 33100 Jun  3  2017 HISTORY
drwxrwxr-x 2 root root  4096 Jun  3  2017 init.d
-rw-rw-r-- 1 root root  7755 Jun  3  2017 INSTALL
-rwxrwxr-x 1 root root  5548 Jun  3  2017 make.sh
drwxrwxr-x 2 root root  4096 Jun  3  2017 php_client
-rw-rw-r-- 1 root root  2380 Jun  3  2017 README.md
-rwxrwxr-x 1 root root  1768 Jun  3  2017 restart.sh
-rwxrwxr-x 1 root root  1680 Jun  3  2017 stop.sh
drwxrwxr-x 4 root root  4096 Jun  3  2017 storage
drwxrwxr-x 2 root root  4096 Jun  3  2017 test
drwxrwxr-x 2 root root  4096 Jun  3  2017 tracker
[root@node101 ~]# 
[root@node101 ~]# cd /yinzhengjie/softwares/fastdfs-5.11/
[root@node101 fastdfs-5.11]# 
[root@node101 fastdfs-5.11]# ./make.sh 
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_proto.o tracker_proto.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_mem.o tracker_mem.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_service.o tracker_service.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_status.o tracker_status.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_global.o tracker_global.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_func.o tracker_func.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o fdfs_shared_func.o fdfs_shared_func.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_nio.o tracker_nio.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_relationship.o tracker_relationship.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_dump.o tracker_dump.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_global.o storage_global.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_func.o storage_func.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_service.o storage_service.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_sync.o storage_sync.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_nio.o storage_nio.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_dio.o storage_dio.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_dump.o storage_dump.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread  -lfastcommon -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_http_shared.o ../common/fdfs_http_shared.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/mime_file_parser.o ../common/mime_file_parser.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../common/fdfs_global.lo ../common/fdfs_global.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../common/fdfs_http_shared.lo ../common/fdfs_http_shared.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../common/mime_file_parser.lo ../common/mime_file_parser.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../tracker/tracker_proto.lo ../tracker/tracker_proto.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../tracker/fdfs_shared_func.lo ../tracker/fdfs_shared_func.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../storage/trunk_mgr/trunk_shared.lo ../storage/trunk_mgr/trunk_shared.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o tracker_client.lo tracker_client.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o client_func.lo client_func.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o client_global.lo client_global.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o storage_client.lo storage_client.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon
[root@node101 fastdfs-5.11]# 
[root@node101 fastdfs-5.11]# ./make.sh
[root@node101 fastdfs-5.11]# ./make.sh install
mkdir -p /usr/bin
mkdir -p /etc/fdfs
cp -f fdfs_trackerd /usr/bin
if [ ! -f /etc/fdfs/tracker.conf.sample ]; then cp -f ../conf/tracker.conf /etc/fdfs/tracker.conf.sample; fi
if [ ! -f /etc/fdfs/storage_ids.conf.sample ]; then cp -f ../conf/storage_ids.conf /etc/fdfs/storage_ids.conf.sample; fi
mkdir -p /usr/bin
mkdir -p /etc/fdfs
cp -f fdfs_storaged  /usr/bin
if [ ! -f /etc/fdfs/storage.conf.sample ]; then cp -f ../conf/storage.conf /etc/fdfs/storage.conf.sample; fi
mkdir -p /usr/bin
mkdir -p /etc/fdfs
mkdir -p /usr/lib64
mkdir -p /usr/lib
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
if [ 0 -eq 1 ]; then cp -f libfdfsclient.a /usr/lib64; cp -f libfdfsclient.a /usr/lib/;fi
if [ 1 -eq 1 ]; then cp -f libfdfsclient.so /usr/lib64; cp -f libfdfsclient.so /usr/lib/;fi
mkdir -p /usr/include/fastdfs
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
if [ ! -f /etc/fdfs/client.conf.sample ]; then cp -f ../conf/client.conf /etc/fdfs/client.conf.sample; fi
[root@node101 fastdfs-5.11]# 
[root@node101 fastdfs-5.11]# ./make.sh install
[root@node102 ~]# wget https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz
--2019-02-19 17:55:14--  https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz
Resolving github.com (github.com)... 13.250.177.223, 52.74.223.119, 13.229.188.59
Connecting to github.com (github.com)|13.250.177.223|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/happyfish100/fastdfs/tar.gz/V5.11 [following]
--2019-02-19 17:55:15--  https://codeload.github.com/happyfish100/fastdfs/tar.gz/V5.11
Resolving codeload.github.com (codeload.github.com)... 13.250.162.133, 54.251.140.56, 13.229.189.0
Connecting to codeload.github.com (codeload.github.com)|13.250.162.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘V5.11.tar.gz’

    [     <=>                                                                                                                                                                  ] 336,939      294KB/s   in 1.1s   

2019-02-19 17:55:19 (294 KB/s) - ‘V5.11.tar.gz’ saved [336939]

[root@node102 ~]# 
[root@node102 ~]# wget https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz
[root@node102 ~]# tar -zxf V5.11.tar.gz  -C /yinzhengjie/softwares/
[root@node102 ~]# 
[root@node102 ~]# cd /yinzhengjie/softwares/fastdfs-5.11/
[root@node102 fastdfs-5.11]# 
[root@node102 fastdfs-5.11]# ./make.sh 
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_proto.o tracker_proto.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_mem.o tracker_mem.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_service.o tracker_service.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_status.o tracker_status.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_global.o tracker_global.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_func.o tracker_func.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o fdfs_shared_func.o fdfs_shared_func.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_nio.o tracker_nio.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_relationship.o tracker_relationship.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o tracker_dump.o tracker_dump.c  -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_global.o storage_global.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_func.o storage_func.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_service.o storage_service.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_sync.o storage_sync.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_nio.o storage_nio.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_dio.o storage_dio.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o storage_dump.o storage_dump.c  -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread  -lfastcommon -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_http_shared.o ../common/fdfs_http_shared.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/mime_file_parser.o ../common/mime_file_parser.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../common/fdfs_global.lo ../common/fdfs_global.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../common/fdfs_http_shared.lo ../common/fdfs_http_shared.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../common/mime_file_parser.lo ../common/mime_file_parser.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../tracker/tracker_proto.lo ../tracker/tracker_proto.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../tracker/fdfs_shared_func.lo ../tracker/fdfs_shared_func.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o ../storage/trunk_mgr/trunk_shared.lo ../storage/trunk_mgr/trunk_shared.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o tracker_client.lo tracker_client.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o client_func.lo client_func.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o client_global.lo client_global.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -fPIC -o storage_client.lo storage_client.c  -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
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
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon
[root@node102 fastdfs-5.11]# 
[root@node102 fastdfs-5.11]# ./make.sh
[root@node102 fastdfs-5.11]# ./make.sh install
mkdir -p /usr/bin
mkdir -p /etc/fdfs
cp -f fdfs_trackerd /usr/bin
if [ ! -f /etc/fdfs/tracker.conf.sample ]; then cp -f ../conf/tracker.conf /etc/fdfs/tracker.conf.sample; fi
if [ ! -f /etc/fdfs/storage_ids.conf.sample ]; then cp -f ../conf/storage_ids.conf /etc/fdfs/storage_ids.conf.sample; fi
mkdir -p /usr/bin
mkdir -p /etc/fdfs
cp -f fdfs_storaged  /usr/bin
if [ ! -f /etc/fdfs/storage.conf.sample ]; then cp -f ../conf/storage.conf /etc/fdfs/storage.conf.sample; fi
mkdir -p /usr/bin
mkdir -p /etc/fdfs
mkdir -p /usr/lib64
mkdir -p /usr/lib
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
if [ 0 -eq 1 ]; then cp -f libfdfsclient.a /usr/lib64; cp -f libfdfsclient.a /usr/lib/;fi
if [ 1 -eq 1 ]; then cp -f libfdfsclient.so /usr/lib64; cp -f libfdfsclient.so /usr/lib/;fi
mkdir -p /usr/include/fastdfs
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
if [ ! -f /etc/fdfs/client.conf.sample ]; then cp -f ../conf/client.conf /etc/fdfs/client.conf.sample; fi
[root@node102 fastdfs-5.11]# 
[root@node102 fastdfs-5.11]# ./make.sh install

4>.FastDFS的文件存放說明 

[root@node101 ~]# ll /etc/fdfs/                          #配置文件存放路徑
total 24
-rw-r--r-- 1 root root 1461 Feb 19 17:58 client.conf.sample
-rw-r--r-- 1 root root 7927 Feb 19 17:58 storage.conf.sample
-rw-r--r-- 1 root root  105 Feb 19 17:58 storage_ids.conf.sample
-rw-r--r-- 1 root root 7389 Feb 19 17:58 tracker.conf.sample
[root@node101 ~]# 
[root@node101 ~]#
[root@node101 ~]# ll /etc/init.d/fdfs_*                    #腳本存放路徑
-rwxr-xr-x 1 root root 961 Feb 19 17:58 /etc/init.d/fdfs_storaged     #用於存儲的腳本
-rwxr-xr-x 1 root root 963 Feb 19 17:58 /etc/init.d/fdfs_trackerd     #用於追蹤的腳本
[root@node101 ~]#     
[root@node101 ~]#

5>.創建存儲數據的路徑

[root@node101 ~]# mkdir -p /home/yinzhengjie/
.bash_logout   .bash_profile  .bashrc        Desktop/       glusterfs/     
[root@node101 ~]# mkdir -p /home/yinzhengjie/fastdfs/data/fdfs_tracker
[root@node101 ~]# 
[root@node101 ~]# mkdir -p /home/yinzhengjie/fastdfs/data/fdfs_storage
[root@node101 ~]# 
[root@node101 ~]# ssh node102.yinzhengjie.org.cn
Last login: Tue Feb 19 12:50:49 2019 from node101.yinzhengjie.org.cn
[root@node102 ~]# 
[root@node102 ~]# mkdir -p /home/yinzhengjie/fastdfs/data/fdfs_tracker
[root@node102 ~]# 
[root@node102 ~]# mkdir -p /home/yinzhengjie/fastdfs/data/fdfs_storage
[root@node102 ~]# 
[root@node102 ~]# exit 
logout
Connection to node102.yinzhengjie.org.cn closed.
[root@node101 ~]# 

6>.修改配置文件(我這里的做法是在node101.yinzhengjie.org.cn上配置好后,將該配置文件拷貝到node102.yinzhengjie.org.cn節點上去!)

[root@node101 ~]# cd /etc/fdfs/
[root@node101 fdfs]# 
[root@node101 fdfs]# ll
total 24
-rw-r--r-- 1 root root 1461 Feb 19 17:58 client.conf.sample
-rw-r--r-- 1 root root 7927 Feb 19 17:58 storage.conf.sample
-rw-r--r-- 1 root root  105 Feb 19 17:58 storage_ids.conf.sample
-rw-r--r-- 1 root root 7389 Feb 19 17:58 tracker.conf.sample
[root@node101 fdfs]# 
[root@node101 fdfs]# cp storage.conf.sample storage.conf
[root@node101 fdfs]# 
[root@node101 fdfs]# cp tracker.conf.sample tracker.conf
[root@node101 fdfs]# 
[root@node101 ~]# grep base_path /etc/fdfs/tracker.conf
base_path=/home/yuqing/fastdfs
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#base_path=/home/yuqing/fastdfs#base_path=/home/yinzhengjie/fastdfs/data/fdfs_tracker#' /etc/fdfs/tracker.conf
[root@node101 ~]# 
[root@node101 ~]# grep base_path /etc/fdfs/tracker.conf
base_path=/home/yinzhengjie/fastdfs/data/fdfs_tracker
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#base_path=/home/yuqing/fastdfs#base_path=/home/yinzhengjie/fastdfs/data/fdfs_tracker#' /etc/fdfs/tracker.conf
[root@node101 ~]# grep base_path /etc/fdfs/storage.conf | grep -v ^#
base_path=/home/yuqing/fastdfs
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#base_path=/home/yuqing/fastdfs#base_path=/home/yinzhengjie/fastdfs/data/fdfs_storage#' /etc/fdfs/storage.conf                                            
[root@node101 ~]# 
[root@node101 ~]# grep base_path /etc/fdfs/storage.conf | grep -v ^#                                                                     
base_path=/home/yinzhengjie/fastdfs/data/fdfs_storage
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#base_path=/home/yuqing/fastdfs#base_path=/home/yinzhengjie/fastdfs/data/fdfs_storage#' /etc/fdfs/storage.conf
[root@node101 ~]# grep store_path0 /etc/fdfs/storage.conf | grep -v ^#
store_path0=/home/yuqing/fastdfs
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#store_path0=/home/yuqing/fastdfs#store_path0=/home/yinzhengjie/fastdfs/data/fdfs_storage/store#' /etc/fdfs/storage.conf                                                                
[root@node101 ~]# 
[root@node101 ~]# grep store_path0 /etc/fdfs/storage.conf | grep -v ^#                                                                             
store_path0=/home/yinzhengjie/fastdfs/data/fdfs_storage/store
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#store_path0=/home/yuqing/fastdfs#store_path0=/home/yinzhengjie/fastdfs/data/fdfs_storage/store#' /etc/fdfs/storage.conf
[root@node101 ~]# grep tracker_server /etc/fdfs/storage.conf | grep -v ^#                                                                                           
tracker_server=192.168.209.121:22122
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#tracker_server=192.168.209.121:22122#tracker_server=node101.yinzhengjie.org.cn:22122\ntracker_server=node102.yinzhengjie.org.cn:22122\n#' /etc/fdfs/storage.conf
[root@node101 ~]# 
[root@node101 ~]# grep tracker_server /etc/fdfs/storage.conf | grep -v ^#
tracker_server=node101.yinzhengjie.org.cn:22122
tracker_server=node102.yinzhengjie.org.cn:22122
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#tracker_server=192.168.209.121:22122#tracker_server=node101.yinzhengjie.org.cn:22122\ntracker_server=node102.yinzhengjie.org.cn:22122\n#' /etc/fdfs/storage.conf
[root@node101 ~]# scp /etc/fdfs/tracker.conf /etc/fdfs/storage.conf node102.yinzhengjie.org.cn:/etc/fdfs/              #將node101.yinzhengjie.org.cn的配置同步到node102.yinzhengjie.org.cn上去!
tracker.conf                                                                                                                                                                     100% 7412     8.9MB/s   00:00    
storage.conf                                                                                                                                                                     100% 8039    13.1MB/s   00:00    
[root@node101 ~]# 
[root@node101 ~]# ssh node102.yinzhengjie.org.cn
Last login: Tue Feb 19 18:46:47 2019 from node101.yinzhengjie.org.cn
[root@node102 ~]# 
[root@node102 ~]# 
[root@node102 ~]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 
[root@node102 ~]# 
[root@node102 ~]# hostname
node102.yinzhengjie.org.cn
[root@node102 ~]# 
[root@node102 ~]# 
[root@node102 ~]# grep base_path /etc/fdfs/tracker.conf
base_path=/home/yinzhengjie/fastdfs/data/fdfs_tracker
[root@node102 ~]# 
[root@node102 ~]# grep base_path /etc/fdfs/storage.conf | grep -v ^#
base_path=/home/yinzhengjie/fastdfs/data/fdfs_storage
[root@node102 ~]# 
[root@node102 ~]# grep store_path0 /etc/fdfs/storage.conf | grep -v ^#
store_path0=/home/yinzhengjie/fastdfs/data/fdfs_storage/store
[root@node102 ~]# 
[root@node102 ~]# grep tracker_server /etc/fdfs/storage.conf | grep -v ^# 
tracker_server=node101.yinzhengjie.org.cn:22122
tracker_server=node102.yinzhengjie.org.cn:22122
[root@node102 ~]#  
[root@node102 ~]# diff /etc/fdfs/storage.conf /etc/fdfs/storage.conf.sample 
41c41
< base_path=/home/yinzhengjie/fastdfs/data/fdfs_storage
---
> base_path=/home/yuqing/fastdfs
109c109
< store_path0=/home/yinzhengjie/fastdfs/data/fdfs_storage/store
---
> store_path0=/home/yuqing/fastdfs
118,120c118
< tracker_server=node101.yinzhengjie.org.cn:22122
< tracker_server=node102.yinzhengjie.org.cn:22122
< 
---
> tracker_server=192.168.209.121:22122
[root@node102 ~]# 
[root@node102 ~]# diff /etc/fdfs/storage.conf /etc/fdfs/storage.conf.sample 
[root@node102 ~]# diff /etc/fdfs/tracker.conf /etc/fdfs/tracker.conf.sample 
22c22
< base_path=/home/yinzhengjie/fastdfs/data/fdfs_tracker
---
> base_path=/home/yuqing/fastdfs
[root@node102 ~]# 
[root@node102 ~]# 
[root@node102 ~]# diff /etc/fdfs/tracker.conf /etc/fdfs/tracker.conf.sample

7>.在各個節點上啟動FastDFS服務 

[root@node102 ~]# yum -y install net-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.24.20131004git.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                          Arch                                          Version                                                          Repository                                   Size
===================================================================================================================================================================================================================
Installing:
 net-tools                                        x86_64                                        2.0-0.24.20131004git.el7                                         base                                        306 k

Transaction Summary
===================================================================================================================================================================================================================
Install  1 Package

Total download size: 306 k
Installed size: 918 k
Downloading packages:
net-tools-2.0-0.24.20131004git.el7.x86_64.rpm                                                                                                                                               | 306 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : net-tools-2.0-0.24.20131004git.el7.x86_64                                                                                                                                                       1/1 
  Verifying  : net-tools-2.0-0.24.20131004git.el7.x86_64                                                                                                                                                       1/1 

Installed:
  net-tools.x86_64 0:2.0-0.24.20131004git.el7                                                                                                                                                                      

Complete!
[root@node102 ~]# 
[root@node102 ~]# yum -y install net-tools        #安裝網絡工具
[root@node101 ~]# /etc/init.d/fdfs_trackerd start
Reloading systemd:                                         [  OK  ]
Starting fdfs_trackerd (via systemctl):                    [  OK  ]
[root@node101 ~]# 
[root@node101 ~]# mkdir -pv /home/yinzhengjie/fastdfs/data/fdfs_storage/store/data          #這個目錄需要我們手動創建一下,否則啟動時日志會報錯!
mkdir: created directory ‘/home/yinzhengjie/fastdfs/data/fdfs_storage/store’
mkdir: created directory ‘/home/yinzhengjie/fastdfs/data/fdfs_storage/store/data’
[root@node101 ~]#
[root@node101 ~]# /etc/init.d/fdfs_storaged start
Starting fdfs_storaged (via systemctl):                    [  OK  ]
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# netstat -untalp | grep fdfs
tcp        0      0 0.0.0.0:22122           0.0.0.0:*               LISTEN      11694/fdfs_trackerd 
tcp        0      0 0.0.0.0:23000           0.0.0.0:*               LISTEN      12189/fdfs_storaged 
tcp        0      0 172.30.1.101:49142      172.30.1.102:22122      ESTABLISHED 11694/fdfs_trackerd 
tcp        0      0 172.30.1.101:51268      172.30.1.102:23000      ESTABLISHED 12189/fdfs_storaged 
tcp        0      0 172.30.1.101:54588      172.30.1.101:22122      ESTABLISHED 12189/fdfs_storaged 
tcp        0      0 172.30.1.101:23000      172.30.1.102:37686      ESTABLISHED 12189/fdfs_storaged 
tcp        0      0 172.30.1.101:22122      172.30.1.102:59616      ESTABLISHED 11694/fdfs_trackerd 
tcp        0      0 172.30.1.101:22122      172.30.1.101:54588      ESTABLISHED 11694/fdfs_trackerd 
tcp        0      0 172.30.1.101:49102      172.30.1.102:22122      ESTABLISHED 12189/fdfs_storaged 
[root@node101 ~]# 
[root@node101 ~]#
[root@node101 ~]# netstat -untalp | grep 23000
tcp        0      0 0.0.0.0:23000           0.0.0.0:*               LISTEN      12189/fdfs_storaged 
tcp        0      0 172.30.1.101:51268      172.30.1.102:23000      ESTABLISHED 12189/fdfs_storaged 
tcp        0      0 172.30.1.101:23000      172.30.1.102:37686      ESTABLISHED 12189/fdfs_storaged 
[root@node101 ~]# 
[root@node101 ~]# netstat -untalp | grep 22122
tcp        0      0 0.0.0.0:22122           0.0.0.0:*               LISTEN      11694/fdfs_trackerd 
tcp        0      0 172.30.1.101:49142      172.30.1.102:22122      ESTABLISHED 11694/fdfs_trackerd 
tcp        0      0 172.30.1.101:54588      172.30.1.101:22122      ESTABLISHED 12189/fdfs_storaged 
tcp        0      0 172.30.1.101:22122      172.30.1.102:59616      ESTABLISHED 11694/fdfs_trackerd 
tcp        0      0 172.30.1.101:22122      172.30.1.101:54588      ESTABLISHED 11694/fdfs_trackerd 
tcp        0      0 172.30.1.101:49102      172.30.1.102:22122      ESTABLISHED 12189/fdfs_storaged 
[root@node101 ~]# 
[root@node101 ~]# 
[root@node102 ~]# /etc/init.d/fdfs_trackerd start
Reloading systemd:                                         [  OK  ]
Starting fdfs_trackerd (via systemctl):                    [  OK  ]
[root@node102 ~]# 
[root@node102 ~]# /etc/init.d/fdfs_trackerd start
[root@node102 ~]# mkdir -pv /home/yinzhengjie/fastdfs/data/fdfs_storage/store/data
mkdir: created directory ‘/home/yinzhengjie/fastdfs/data/fdfs_storage/store’
mkdir: created directory ‘/home/yinzhengjie/fastdfs/data/fdfs_storage/store/data’
[root@node102 ~]# 
[root@node102 ~]# /etc/init.d/fdfs_storaged start
Starting fdfs_storaged (via systemctl):                    [  OK  ]
[root@node102 ~]# 
[root@node102 ~]# /etc/init.d/fdfs_storaged start 
[root@node101 ~]# tail -1000f /home/yinzhengjie/fastdfs/data/fdfs_tracker/logs/trackerd.log 
[2019-02-19 19:30:33] INFO - FastDFS v5.11, base_path=/home/yinzhengjie/fastdfs/data/fdfs_tracker, run_by_group=, run_by_user=, connect_timeout=30s, network_timeout=60s, port=22122, bind_addr=, max_connections=256, accept_threads=1, work_threads=4, min_buff_size=8192, max_buff_size=131072, store_lookup=2, store_group=, store_server=0, store_path=0, reserved_storage_space=10.00%, download_server=0, allow_ip_count=-1, sync_log_buff_interval=10s, check_active_interval=120s, thread_stack_size=64 KB, storage_ip_changed_auto_adjust=1, storage_sync_file_max_delay=86400s, storage_sync_file_max_time=300s, use_trunk_file=0, slot_min_size=256, slot_max_size=16 MB, trunk_file_size=64 MB, trunk_create_file_advance=0, trunk_create_file_time_base=02:00, trunk_create_file_interval=86400, trunk_create_file_space_threshold=20 GB, trunk_init_check_occupying=0, trunk_init_reload_from_binlog=0, trunk_compress_binlog_min_interval=0, use_storage_id=0, id_type_in_filename=ip, storage_id_count=0, rotate_error_log=0, error_log_rotate_time=00:00, rotate_error_log_size=0, log_file_keep_days=0, store_slave_file_use_link=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s
[2019-02-19 19:43:24] ERROR - file: tracker_service.c, line: 597, client ip: 172.30.1.101, invalid group_name: group1
[2019-02-19 19:43:24] ERROR - file: tracker_service.c, line: 893, client ip: 172.30.1.102, leader 172.30.1.102:22122 not exist
[2019-02-19 19:43:25] INFO - file: tracker_mem.c, line: 4217, sys files loaded from tracker server 172.30.1.102:22122
[2019-02-19 19:43:26] INFO - file: tracker_relationship.c, line: 389, selecting leader...
[2019-02-19 19:43:31] INFO - file: tracker_relationship.c, line: 389, selecting leader...
[2019-02-19 19:43:32] INFO - file: tracker_relationship.c, line: 389, selecting leader...
[2019-02-19 19:43:33] INFO - file: tracker_relationship.c, line: 389, selecting leader...
[2019-02-19 19:43:34] INFO - file: tracker_service.c, line: 979, the tracker leader is 172.30.1.102:22122
[2019-02-19 19:50:50] ERROR - file: tracker_service.c, line: 611, client ip: 172.30.1.102, group_name: group1, storage server: 172.30.1.102 not exist
[2019-02-19 19:50:53] WARNING - file: tracker_mem.c, line: 4754, storage server: 172.30.1.102:23000, dest status: 2, my status: 1, should change my status!
[2019-02-19 19:50:53] WARNING - file: tracker_mem.c, line: 4754, storage server: 172.30.1.102:23000, dest status: 5, my status: 2, should change my status!
[root@node101 ~]# tail -1000f /home/yinzhengjie/fastdfs/data/fdfs_tracker/logs/trackerd.log            #查看trackerd進程日志
[root@node102 ~]# tail -1000f /home/yinzhengjie/fastdfs/data/fdfs_storage/logs/storaged.log 
[2019-02-19 19:50:48] INFO - FastDFS v5.11, base_path=/home/yinzhengjie/fastdfs/data/fdfs_storage, store_path_count=1, subdir_count_per_path=256, group_name=group1, run_by_group=, run_by_user=, connect_timeout=30s, network_timeout=60s, port=23000, bind_addr=, client_bind=1, max_connections=256, accept_threads=1, work_threads=4, disk_rw_separated=1, disk_reader_threads=1, disk_writer_threads=1, buff_size=256KB, heart_beat_interval=30s, stat_report_interval=60s, tracker_server_count=2, sync_wait_msec=50ms, sync_interval=0ms, sync_start_time=00:00, sync_end_time=23:59, write_mark_file_freq=500, allow_ip_count=-1, file_distribute_path_mode=0, file_distribute_rotate_count=100, fsync_after_written_bytes=0, sync_log_buff_interval=10s, sync_binlog_buff_interval=10s, sync_stat_file_interval=300s, thread_stack_size=512 KB, upload_priority=10, if_alias_prefix=, check_file_duplicate=0, file_signature_method=hash, FDHT group count=0, FDHT server count=0, FDHT key_namespace=, FDHT keep_alive=0, HTTP server port=8888, domain name=, use_access_log=0, rotate_access_log=0, access_log_rotate_time=00:00, rotate_error_log=0, error_log_rotate_time=00:00, rotate_access_log_size=0, rotate_error_log_size=0, log_file_keep_days=0, file_sync_skip_invalid_record=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s
data path: /home/yinzhengjie/fastdfs/data/fdfs_storage/store/data, mkdir sub dir...
mkdir data path: 00 ...
mkdir data path: 01 ...
mkdir data path: 02 ...
mkdir data path: 03 ...
mkdir data path: 04 ...
mkdir data path: 05 ...
mkdir data path: 06 ...
mkdir data path: 07 ...
mkdir data path: 08 ...
mkdir data path: 09 ...
mkdir data path: 0A ...
mkdir data path: 0B ...
mkdir data path: 0C ...
mkdir data path: 0D ...
mkdir data path: 0E ...
mkdir data path: 0F ...
mkdir data path: 10 ...
mkdir data path: 11 ...
mkdir data path: 12 ...
mkdir data path: 13 ...
mkdir data path: 14 ...
mkdir data path: 15 ...
mkdir data path: 16 ...
mkdir data path: 17 ...
mkdir data path: 18 ...
mkdir data path: 19 ...
mkdir data path: 1A ...
mkdir data path: 1B ...
mkdir data path: 1C ...
mkdir data path: 1D ...
mkdir data path: 1E ...
mkdir data path: 1F ...
mkdir data path: 20 ...
mkdir data path: 21 ...
mkdir data path: 22 ...
mkdir data path: 23 ...
mkdir data path: 24 ...
mkdir data path: 25 ...
mkdir data path: 26 ...
mkdir data path: 27 ...
mkdir data path: 28 ...
mkdir data path: 29 ...
mkdir data path: 2A ...
mkdir data path: 2B ...
mkdir data path: 2C ...
mkdir data path: 2D ...
mkdir data path: 2E ...
mkdir data path: 2F ...
mkdir data path: 30 ...
mkdir data path: 31 ...
mkdir data path: 32 ...
mkdir data path: 33 ...
mkdir data path: 34 ...
mkdir data path: 35 ...
mkdir data path: 36 ...
mkdir data path: 37 ...
mkdir data path: 38 ...
mkdir data path: 39 ...
mkdir data path: 3A ...
mkdir data path: 3B ...
mkdir data path: 3C ...
mkdir data path: 3D ...
mkdir data path: 3E ...
mkdir data path: 3F ...
mkdir data path: 40 ...
mkdir data path: 41 ...
mkdir data path: 42 ...
mkdir data path: 43 ...
mkdir data path: 44 ...
mkdir data path: 45 ...
mkdir data path: 46 ...
mkdir data path: 47 ...
mkdir data path: 48 ...
mkdir data path: 49 ...
mkdir data path: 4A ...
mkdir data path: 4B ...
mkdir data path: 4C ...
mkdir data path: 4D ...
mkdir data path: 4E ...
mkdir data path: 4F ...
mkdir data path: 50 ...
mkdir data path: 51 ...
mkdir data path: 52 ...
mkdir data path: 53 ...
mkdir data path: 54 ...
mkdir data path: 55 ...
mkdir data path: 56 ...
mkdir data path: 57 ...
mkdir data path: 58 ...
mkdir data path: 59 ...
mkdir data path: 5A ...
mkdir data path: 5B ...
mkdir data path: 5C ...
mkdir data path: 5D ...
mkdir data path: 5E ...
mkdir data path: 5F ...
mkdir data path: 60 ...
mkdir data path: 61 ...
mkdir data path: 62 ...
mkdir data path: 63 ...
mkdir data path: 64 ...
mkdir data path: 65 ...
mkdir data path: 66 ...
mkdir data path: 67 ...
mkdir data path: 68 ...
mkdir data path: 69 ...
mkdir data path: 6A ...
mkdir data path: 6B ...
mkdir data path: 6C ...
mkdir data path: 6D ...
mkdir data path: 6E ...
mkdir data path: 6F ...
mkdir data path: 70 ...
mkdir data path: 71 ...
mkdir data path: 72 ...
mkdir data path: 73 ...
mkdir data path: 74 ...
mkdir data path: 75 ...
mkdir data path: 76 ...
mkdir data path: 77 ...
mkdir data path: 78 ...
mkdir data path: 79 ...
mkdir data path: 7A ...
mkdir data path: 7B ...
mkdir data path: 7C ...
mkdir data path: 7D ...
mkdir data path: 7E ...
mkdir data path: 7F ...
mkdir data path: 80 ...
mkdir data path: 81 ...
mkdir data path: 82 ...
mkdir data path: 83 ...
mkdir data path: 84 ...
mkdir data path: 85 ...
mkdir data path: 86 ...
mkdir data path: 87 ...
mkdir data path: 88 ...
mkdir data path: 89 ...
mkdir data path: 8A ...
mkdir data path: 8B ...
mkdir data path: 8C ...
mkdir data path: 8D ...
mkdir data path: 8E ...
mkdir data path: 8F ...
mkdir data path: 90 ...
mkdir data path: 91 ...
mkdir data path: 92 ...
mkdir data path: 93 ...
mkdir data path: 94 ...
mkdir data path: 95 ...
mkdir data path: 96 ...
mkdir data path: 97 ...
mkdir data path: 98 ...
mkdir data path: 99 ...
mkdir data path: 9A ...
mkdir data path: 9B ...
mkdir data path: 9C ...
mkdir data path: 9D ...
mkdir data path: 9E ...
mkdir data path: 9F ...
mkdir data path: A0 ...
mkdir data path: A1 ...
mkdir data path: A2 ...
mkdir data path: A3 ...
mkdir data path: A4 ...
mkdir data path: A5 ...
mkdir data path: A6 ...
mkdir data path: A7 ...
mkdir data path: A8 ...
mkdir data path: A9 ...
mkdir data path: AA ...
mkdir data path: AB ...
mkdir data path: AC ...
mkdir data path: AD ...
mkdir data path: AE ...
mkdir data path: AF ...
mkdir data path: B0 ...
mkdir data path: B1 ...
mkdir data path: B2 ...
mkdir data path: B3 ...
mkdir data path: B4 ...
mkdir data path: B5 ...
mkdir data path: B6 ...
mkdir data path: B7 ...
mkdir data path: B8 ...
mkdir data path: B9 ...
mkdir data path: BA ...
mkdir data path: BB ...
mkdir data path: BC ...
mkdir data path: BD ...
mkdir data path: BE ...
mkdir data path: BF ...
mkdir data path: C0 ...
mkdir data path: C1 ...
mkdir data path: C2 ...
mkdir data path: C3 ...
mkdir data path: C4 ...
mkdir data path: C5 ...
mkdir data path: C6 ...
mkdir data path: C7 ...
mkdir data path: C8 ...
mkdir data path: C9 ...
mkdir data path: CA ...
mkdir data path: CB ...
mkdir data path: CC ...
mkdir data path: CD ...
mkdir data path: CE ...
mkdir data path: CF ...
mkdir data path: D0 ...
mkdir data path: D1 ...
mkdir data path: D2 ...
mkdir data path: D3 ...
mkdir data path: D4 ...
mkdir data path: D5 ...
mkdir data path: D6 ...
mkdir data path: D7 ...
mkdir data path: D8 ...
mkdir data path: D9 ...
mkdir data path: DA ...
mkdir data path: DB ...
mkdir data path: DC ...
mkdir data path: DD ...
mkdir data path: DE ...
mkdir data path: DF ...
mkdir data path: E0 ...
mkdir data path: E1 ...
mkdir data path: E2 ...
mkdir data path: E3 ...
mkdir data path: E4 ...
mkdir data path: E5 ...
mkdir data path: E6 ...
mkdir data path: E7 ...
mkdir data path: E8 ...
mkdir data path: E9 ...
mkdir data path: EA ...
mkdir data path: EB ...
mkdir data path: EC ...
mkdir data path: ED ...
mkdir data path: EE ...
mkdir data path: EF ...
mkdir data path: F0 ...
mkdir data path: F1 ...
mkdir data path: F2 ...
mkdir data path: F3 ...
mkdir data path: F4 ...
mkdir data path: F5 ...
mkdir data path: F6 ...
mkdir data path: F7 ...
mkdir data path: F8 ...
mkdir data path: F9 ...
mkdir data path: FA ...
mkdir data path: FB ...
mkdir data path: FC ...
mkdir data path: FD ...
mkdir data path: FE ...
mkdir data path: FF ...
data path: /home/yinzhengjie/fastdfs/data/fdfs_storage/store/data, mkdir sub dir done.
[2019-02-19 19:50:51] INFO - file: storage_param_getter.c, line: 191, use_storage_id=0, id_type_in_filename=ip, storage_ip_changed_auto_adjust=1, store_path=0, reserved_storage_space=10.00%, use_trunk_file=0, slot_min_size=256, slot_max_size=16 MB, trunk_file_size=64 MB, trunk_create_file_advance=0, trunk_create_file_time_base=02:00, trunk_create_file_interval=86400, trunk_create_file_space_threshold=20 GB, trunk_init_check_occupying=0, trunk_init_reload_from_binlog=0, trunk_compress_binlog_min_interval=0, store_slave_file_use_link=0
[2019-02-19 19:50:51] INFO - file: storage_func.c, line: 257, tracker_client_ip: 172.30.1.102, my_server_id_str: 172.30.1.102, g_server_id_in_filename: 1711349420
[2019-02-19 19:50:51] ERROR - file: tracker_proto.c, line: 48, server: 172.30.1.101:22122, response status 2 != 0
[2019-02-19 19:50:51] ERROR - file: tracker_client_thread.c, line: 2377, fdfs_recv_response fail, result: 2
[2019-02-19 19:50:51] ERROR - file: tracker_proto.c, line: 48, server: 172.30.1.102:22122, response status 2 != 0
[2019-02-19 19:50:51] ERROR - file: tracker_client_thread.c, line: 2377, fdfs_recv_response fail, result: 2
[2019-02-19 19:50:51] INFO - file: tracker_client_thread.c, line: 310, successfully connect to tracker server 172.30.1.102:22122, as a tracker client, my ip is 172.30.1.102
[2019-02-19 19:50:51] INFO - file: tracker_client_thread.c, line: 1947, tracker server: #0. 172.30.1.101:22122, my_report_status: -1
[2019-02-19 19:50:51] INFO - file: tracker_client_thread.c, line: 1263, tracker server 172.30.1.102:22122, set tracker leader: 172.30.1.102:22122
[2019-02-19 19:50:51] INFO - file: storage_sync.c, line: 2732, successfully connect to storage server 172.30.1.101:23000
[2019-02-19 19:50:52] INFO - file: tracker_client_thread.c, line: 310, successfully connect to tracker server 172.30.1.101:22122, as a tracker client, my ip is 172.30.1.102
[root@node102 ~]# tail -1000f /home/yinzhengjie/fastdfs/data/fdfs_storage/logs/storaged.log            #查看storaged進程日志

 

四.FastDFS的基本使用

1>.配置FastDFS的client的配置文件

[root@node101 ~]# cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf
[root@node101 ~]# 
[root@node101 ~]# grep base_path /etc/fdfs/client.conf
base_path=/home/yuqing/fastdfs
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#base_path=/home/yuqing/fastdfs#base_path=/var/log/fastdfs_client#' /etc/fdfs/client.conf          #配置日志的存放路徑
[root@node101 ~]# 
[root@node101 ~]# grep base_path /etc/fdfs/client.conf                                                              
base_path=/var/log/fastdfs_client
[root@node101 ~]# 
[root@node101 ~]# grep tracker_server=  /etc/fdfs/client.conf | grep -v ^#
tracker_server=192.168.0.197:22122
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# sed -i s'#tracker_server=192.168.0.197:22122#tracker_server=node101.yinzhengjie.org.cn:22122\ntracker_server=node102.yinzhengjie.org.cn:22122#' /etc/fdfs/client.conf      #配置Tracker地址
[root@node101 ~]# 
[root@node101 ~]# grep tracker_server=  /etc/fdfs/client.conf | grep -v ^#                                                                                                              
tracker_server=node101.yinzhengjie.org.cn:22122
tracker_server=node102.yinzhengjie.org.cn:22122
[root@node101 ~]# 
[root@node101 ~]# mkdir /var/log/fastdfs_client                                            #這一步驟必須做,如果該目錄不存在的話,我們在下一步測試上傳文件時會報錯!
[root@node101 ~]#

2>.上傳文件到FastDFS 

[root@node101 ~]# fdfs_upload_file /etc/fdfs/client.conf /etc/passwd
group1/M00/00/00/rB4BZVxr8omAKBoWAAAEXu7xndU2260655          #注意,這里返回的值就是fastDFS存儲路徑
[root@node101 ~]# 
[root@node101 ~]# 

3>.下載文件到本地

[root@node101 ~]# fdfs_download_file /etc/fdfs/client.conf group1/M00/00/00/rB4BZVxr8omAKBoWAAAEXu7xndU2260655
[root@node101 ~]# 
[root@node101 ~]# md5sum rB4BZVxr8omAKBoWAAAEXu7xndU2260655              
b8e310865d07d9d3a9eac16f6c5547ee  rB4BZVxr8omAKBoWAAAEXu7xndU2260655
[root@node101 ~]# 
[root@node101 ~]# md5sum /etc/passwd                      #我們會發現文件的內容並沒有被修改!
b8e310865d07d9d3a9eac16f6c5547ee  /etc/passwd
[root@node101 ~]#  
[root@node101 ~]# ls  /home/yinzhengjie/fastdfs/data/fdfs_storage/store/data/00/00/rB4BZVxr8omAKBoWAAAEXu7xndU2260655   
/home/yinzhengjie/fastdfs/data/fdfs_storage/store/data/00/00/rB4BZVxr8omAKBoWAAAEXu7xndU2260655
[root@node101 ~]# 
[root@node101 ~]# md5sum  /home/yinzhengjie/fastdfs/data/fdfs_storage/store/data/00/00/rB4BZVxr8omAKBoWAAAEXu7xndU2260655    
b8e310865d07d9d3a9eac16f6c5547ee  /home/yinzhengjie/fastdfs/data/fdfs_storage/store/data/00/00/rB4BZVxr8omAKBoWAAAEXu7xndU2260655
[root@node101 ~]# 
[root@node101 ~]# md5sum  /etc/passwd
b8e310865d07d9d3a9eac16f6c5547ee  /etc/passwd
[root@node101 ~]# 
[root@node101 ~]# cat  /home/yinzhengjie/fastdfs/data/fdfs_storage/store/data/00/00/rB4BZVxr8omAKBoWAAAEXu7xndU2260655  
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
systemd-network:x:192:192:systemd Network Management:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
polkitd:x:999:998:User for polkitd:/:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
chrony:x:998:996::/var/lib/chrony:/sbin/nologin
yinzhengjie:x:1000:1000:Jason Yin:/home/yinzhengjie:/bin/bash
ntp:x:38:38::/etc/ntp:/sbin/nologin
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/false
gluster:x:997:994:GlusterFS daemons:/run/gluster:/sbin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
[root@node101 ~]# 
[root@node101 ~]# md5sum /home/yinzhengjie/fastdfs/data/fdfs_storage/store/data/00/00/rB4BZVxr8omAKBoWAAAEXu7xndU2260655

4>.查詢文件信息 

[root@node101 ~]# fdfs_file_info /etc/fdfs/client.conf group1/M00/00/00/rB4BZVxr8omAKBoWAAAEXu7xndU2260655
source storage id: 0
source ip address: 172.30.1.101
file create timestamp: 2019-02-19 20:11:53
file size: 1118
file crc32: 4008811989 (0xEEF19DD5)
[root@node101 ~]# 

5>.給某個文件追加內容

[root@node101 ~]# 
[root@node101 ~]# echo "尹正傑到此一游!" > 1.txt
[root@node101 ~]# 
[root@node101 ~]# echo "Jason Yin" > 2.txt   
[root@node101 ~]# 
[root@node101 ~]# cat 1.txt 
尹正傑到此一游!
[root@node101 ~]# 
[root@node101 ~]# cat 2.txt 
Jason Yin
[root@node101 ~]# 
[root@node101 ~]# fdfs_upload_appender /etc/fdfs/client.conf 1.txt 
group1/M00/00/00/rB4BZVxr9pOEPLVbAAAAAEM-3fw595.txt
[root@node101 ~]# 
[root@node101 ~]# fdfs_append_file  /etc/fdfs/client.conf group1/M00/00/00/rB4BZVxr9pOEPLVbAAAAAEM-3fw595.txt 2.txt         #我們這里吧2.txt的內容追加到了1.txt中!
[root@node101 ~]#           
[root@node101 ~]# fdfs_download_file /etc/fdfs/client.conf group1/M00/00/00/rB4BZVxr9pOEPLVbAAAAAEM-3fw595.txt
[root@node101 ~]# 
[root@node101 ~]# cat rB4BZVxr9pOEPLVbAAAAAEM-3fw595.txt
尹正傑到此一游!
Jason Yin
[root@node101 ~]# 

6>.刪除文件 

[root@node101 ~]# 
[root@node101 ~]# fdfs_file_info /etc/fdfs/client.conf group1/M00/00/00/rB4BZVxr9pOEPLVbAAAAAEM-3fw595.txt          #我們已經確認該文件已經存在,使用下面的命令刪除該文件后就無法查看到該文件的信息啦!
source storage id: 0
source ip address: 172.30.1.101
file create timestamp: 2019-02-19 20:30:13
file size: 35
file crc32: 1128193532 (0x433EDDFC)
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# fdfs_delete_file /etc/fdfs/client.conf group1/M00/00/00/rB4BZVxr9pOEPLVbAAAAAEM-3fw595.txt          #刪除FastDFS中已經存在的文件
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# fdfs_file_info /etc/fdfs/client.conf group1/M00/00/00/rB4BZVxr9pOEPLVbAAAAAEM-3fw595.txt  
[2019-02-19 20:34:42] ERROR - file: tracker_proto.c, line: 48, server: 172.30.1.101:23000, response status 2 != 0
[2019-02-19 20:34:42] ERROR - file: ../client/storage_client.c, line: 372, fdfs_recv_response fail, result: 2
query file info fail, error no: 2, error info: No such file or directory
[root@node101 ~]# 
[root@node101 ~]# 

7>.監控FastDFS集群信息

[root@node101 ~]# fdfs_monitor /etc/fdfs/client.conf
[2019-02-19 20:35:52] DEBUG - base_path=/var/log/fastdfs_client, connect_timeout=30, network_timeout=60, tracker_server_count=2, 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

server_count=2, server_index=1

tracker server is 172.30.1.102:22122

group count: 1

Group 1:
group name = group1
disk total space = 11502 MB
disk free space = 10597 MB
trunk free space = 0 MB
storage server count = 2
active server count = 2
storage server port = 23000
storage HTTP port = 8888
store path count = 1
subdir count per path = 256
current write server index = 0
current trunk file id = 0

        Storage 1:
                id = 172.30.1.101
                ip_addr = 172.30.1.101 (node101.yinzhengjie.org.cn)  ACTIVE
                http domain = 
                version = 5.11
                join time = 2019-02-19 19:30:39
                up time = 2019-02-19 19:43:21
                total storage = 11502 MB
                free storage = 10597 MB
                upload priority = 10
                store_path_count = 1
                subdir_count_per_path = 256
                storage_port = 23000
                storage_http_port = 8888
                current_write_path = 0
                source storage id = 
                if_trunk_server = 0
                connection.alloc_count = 256
                connection.current_count = 1
                connection.max_count = 2
                total_upload_count = 3
                success_upload_count = 3
                total_append_count = 1
                success_append_count = 1
                total_modify_count = 0
                success_modify_count = 0
                total_truncate_count = 0
                success_truncate_count = 0
                total_set_meta_count = 0
                success_set_meta_count = 0
                total_delete_count = 1
                success_delete_count = 1
                total_download_count = 2
                success_download_count = 2
                total_get_meta_count = 0
                success_get_meta_count = 0
                total_create_link_count = 0
                success_create_link_count = 0
                total_delete_link_count = 0
                success_delete_link_count = 0
                total_upload_bytes = 1153
                success_upload_bytes = 1153
                total_append_bytes = 10
                success_append_bytes = 10
                total_modify_bytes = 0
                success_modify_bytes = 0
                stotal_download_bytes = 1153
                success_download_bytes = 1153
                total_sync_in_bytes = 35
                success_sync_in_bytes = 35
                total_sync_out_bytes = 0
                success_sync_out_bytes = 0
                total_file_open_count = 8
                success_file_open_count = 8
                total_file_read_count = 2
                success_file_read_count = 2
                total_file_write_count = 6
                success_file_write_count = 6
                last_heart_beat_time = 2019-02-19 20:35:27
                last_source_update = 2019-02-19 20:34:38
                last_sync_update = 2019-02-19 20:27:10
                last_synced_timestamp = 2019-02-19 20:27:01 (0s delay)
        Storage 2:
                id = 172.30.1.102
                ip_addr = 172.30.1.102 (node102.yinzhengjie.org.cn)  ACTIVE
                http domain = 
                version = 5.11
                join time = 2019-02-19 19:30:15
                up time = 2019-02-19 19:50:48
                total storage = 11502 MB
                free storage = 10597 MB
                upload priority = 10
                store_path_count = 1
                subdir_count_per_path = 256
                storage_port = 23000
                storage_http_port = 8888
                current_write_path = 0
                source storage id = 172.30.1.101
                if_trunk_server = 0
                connection.alloc_count = 256
                connection.current_count = 1
                connection.max_count = 2
                total_upload_count = 2
                success_upload_count = 2
                total_append_count = 0
                success_append_count = 0
                total_modify_count = 0
                success_modify_count = 0
                total_truncate_count = 0
                success_truncate_count = 0
                total_set_meta_count = 0
                success_set_meta_count = 0
                total_delete_count = 0
                success_delete_count = 0
                total_download_count = 1
                success_download_count = 1
                total_get_meta_count = 0
                success_get_meta_count = 0
                total_create_link_count = 0
                success_create_link_count = 0
                total_delete_link_count = 0
                success_delete_link_count = 0
                total_upload_bytes = 35
                success_upload_bytes = 35
                total_append_bytes = 0
                success_append_bytes = 0
                total_modify_bytes = 0
                success_modify_bytes = 0
                stotal_download_bytes = 10
                success_download_bytes = 10
                total_sync_in_bytes = 1163
                success_sync_in_bytes = 1163
                total_sync_out_bytes = 0
                success_sync_out_bytes = 0
                total_file_open_count = 7
                success_file_open_count = 7
                total_file_read_count = 1
                success_file_read_count = 1
                total_file_write_count = 6
                success_file_write_count = 6
                last_heart_beat_time = 2019-02-19 20:35:30
                last_source_update = 2019-02-19 20:27:01
                last_sync_update = 2019-02-19 20:34:44
                last_synced_timestamp = 2019-02-19 20:34:38 (0s delay)
[root@node101 ~]# 
[root@node101 ~]# 
[root@node101 ~]# fdfs_monitor /etc/fdfs/client.conf

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM