依舊處於技術探索中,對很對技術處於一種淺嘗的狀態,這裏記一篇關於分佈式文件存儲 FastDFS 的安裝及使用的文章。html
FastDFS是一個開源的分佈式文件系統,她對文件進行管理,功能包括:文件存儲、文件同步、文件訪問(文件上傳、文件下載)等,解決了大容量存儲和負載均衡的問題。特別適合以文件爲載體的在線服務,如相冊網站、視頻網站等。(詳細介紹能夠參考: https://www.oschina.net/p/fas...nginx
./make.sh
及 ./make.sh install
操做yum install -y libevent
安裝 libevent./make.sh
及 ./make.sh install
操做base_path
,配置爲可訪問的目錄/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
ps aux | grep tracker
base_path
,store_path0
及 tracker_server
。 其中, base_path
和 store_path0
配置爲可訪問的路徑,tracker_server
配置爲 tracker 的{服務器地址}:{端口}/usr/bin/fdfs_storaged /etc/fdfs/storage.conf
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
ps aux | grep storage
咱們能夠利用自帶的 client 進行測試。git
base_path
和 tracker_server
,base_path
配置爲可訪問的路徑,tracker_server
配置爲 tracker 的{服務器地址}:{端口}此時可說明 FastDFS 已安裝成功,關於上傳文件的訪問,可繼續參照餘慶老師的開源項目fastdfs-nginx-modulegithub
筆者也將記錄一篇經過 openresty 模塊實現文件的上傳及訪問...shell
持續維護地址:http://jaylin.wang/2016/fastd...centos