您好,登錄后才能下訂單哦!
這篇文章主要介紹Linux系統(tǒng)如何安裝FastDFS,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
環(huán)境:CentOS 7.4.1708 FastDFS版本: 6.04
yum -y install gcc gcc+ gcc-c++ openssl openssl-devel pcre pcre-devel
下載libfastcommon https://github.com/happyfish200/libfastcommon/releases
解壓并安裝libfastcommon:
tar zxvf libfastcommon-1.0.42.tar.gz cd libfastcommon-1.0.42 ./make.sh ./make.sh install
下載FastDFS https://github.com/happyfish200/fastdfs/releases
解壓并安裝FastDFS:
tar zxvf fastdfs-6.04.tar.gz cd fastdfs-6.04 ./make.sh ./make.sh install
進(jìn)入fastdfs配置文件夾 cd /etc/fdfs
拷貝:cp tracker.conf.sample tracker.conf
編輯tracker.conf:vim tracker.conf
#tracker數(shù)據(jù)文件和日志存儲(chǔ)路徑,若不存在請(qǐng)自行創(chuàng)建 base_path=/data/fastdfs/tracker #tracker服務(wù)端口,默認(rèn)22122 port=22122 # HTTP 服務(wù)端口 http.server_port=8080
啟動(dòng): /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
拷貝: cp storage.conf.sample storage.conf
編輯storage.conf: vim storage.conf
#storage所在組名稱 group_name=group1 #storage數(shù)據(jù)文件和日志目錄,若不存在請(qǐng)自行創(chuàng)建 base_path=/data/fastdfs/storage #storage服務(wù)的存儲(chǔ)路徑個(gè)數(shù),需要和store_path個(gè)數(shù)匹配 store_path_count=1 #storage服務(wù)的實(shí)際文件存儲(chǔ)路徑 store_path0=/data/fastdfs/storage_data #tracker服務(wù)的ip和端口,不要使用127.0.0.1 tracker_server=192.168.1.168:22122
啟動(dòng):/usr/bin/fdfs_storaged /etc/fdfs/storage.conf start
查看:/usr/bin/fdfs_monitor /etc/fdfs/storage.conf
拷貝:cp client.conf.sample client.conf
編輯client.conf:vim client.conf
#tracker服務(wù)中配置的路徑 base_path=/data/fastdfs/tracker #tracker服務(wù)的ip 端口 tracker_server=192.168.1.168:22122 #storage服務(wù)的實(shí)際文件存儲(chǔ)路徑 store_path0=/data/fastdfs/storage_data
測(cè)試上傳文件123.log:/usr/bin/fdfs_upload_file /etc/fdfs/client.conf 123.log
以上是“Linux系統(tǒng)如何安裝FastDFS”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。