分布式檔案系統(FastDFS)安裝 配置

2021-09-11 21:54:25 字數 2530 閱讀 4793

[toc]

###fastdfs架構圖:

通過架構圖可以很清晰的看出fastdfs由兩個核心模組組成tracker(***)、storage(儲存器)。

編譯、安裝: ./make.sh &&./make.sh install

編譯、安裝: ./make.sh &&./make.sh install安裝完成後會在/etc/init.d下生成兩個可執行指令碼fdfs_storaged和fdfs_trackerd。

配置tracker服務

編輯配置檔案

[root@hmhbt tracker]# cd /etc/fdfs/

[root@hmhbt fdfs]# cp tracker.conf.sample tracker.conf

[root@hmhbt fdfs]# vim tracker.conf

#啟用配置檔案

disabled=false

#設定tracker的埠號

port=22122

#設定tracker的資料檔案和日誌目錄(需手動建立)

base_path=/mnt/fastdfs/tracker

#設定http埠號

複製**

建立base_path路徑
mkdir -p /mnt/fastdfs/tracker

複製**

防火牆開啟22122埠
-a input -m state --state new -m tcp -p tcp --dport 22122 -j accept 

複製**

啟動tracker伺服器
/etc/init.d/fdfs_trackerd start

複製**

配置storage服務
[root@hmhbt /]# cd /etc/fdfs

[root@hmhbt fdfs]# cp storage.conf.sample storage.conf

# 修改的內容如下:

disabled=false

# 啟用配置檔案

port=23000 # storage服務埠

base_path=/mnt/fastdfs/storage # 資料和日誌檔案儲存根目錄

store_path0=/mnt/fastdfs/storage #第乙個儲存目錄,第二個儲存目錄起名為:store_path1=***,其它儲存目錄名依次類推...

store_path_count=1 # 儲存路徑個數,需要和store_path個數匹配

tracker_server=192.168.1.200:22122 # tracker伺服器ip和埠 可配置多個

tracker_server=192.168.1.200:22122

複製**

建立base_path
[root@hmhbt fdfs]# mkdir -p /mnt/fastdfs/storage

複製**

防火牆開啟23000埠
-a input -m state --state new -m tcp -p tcp --dport 23000 -j accept

複製**

啟動storage
[root@hmhbt fdfs]# /etc/init.d/fdfs_storaged start

複製**

修改tracker伺服器客戶端配置檔案

[root@hmhbt fdfs]# cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf

[root@hmhbt fdfs]# vim /etc/fdfs/client.conf

# 修改以下配置,其它保持預設

複製**

返回檔案id號:group1/m00/00/00/wkgbyfkjaxeafwc3aagx2d-yq14580.jpg

fastdfs介紹(官方文件):download.csdn.net/detail/xyan…  fastdfs配置檔案詳解:download.csdn.net/detail/xyan…

FastDFS分布式檔案系統

服務端兩個角色 tracker 管理集群,tracker 也可以實現集群。每個 tracker 節點地位平等。收集 storage 集群的狀態。storage 實際儲存檔案,storage 分為多個組,每個組之間儲存的檔案是不同的。每 個組內部可以有多個成員,組成員內部儲存的內容是一樣的,組成員的地...

FastDFS分布式檔案系統

fastdfs簡介 fastdfs是乙個輕量級的開源分布式檔案系統 fastdfs主要解決了大容量的檔案儲存和高併發訪問的問題,檔案訪問時實現了負載均衡 fastdfs實現了軟體方式的raid,可以使用廉價的ide硬碟進行儲存 支援相同內容的檔案只儲存乙份,節約磁碟空間 fastdfs只能通過cli...

FastDFS分布式檔案系統

fastdfs服務有三個角色 跟蹤伺服器 tracker server 儲存伺服器 storage server 和客戶端 client 總結 1.高可靠性 無單點故障 2.高吞吐性 只要group足夠多,資料流量是足夠分散的 group 中 storage 儲存依賴本地檔案系統,storage 可...