日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
docker下怎么搭建fastdfs分布式集群

這篇文章主要講解了“docker下怎么搭建fastdfs分布式集群”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“docker下怎么搭建fastdfs分布式集群”吧!

成都創(chuàng)新互聯(lián)主營(yíng)簡(jiǎn)陽(yáng)網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,app軟件定制開發(fā),簡(jiǎn)陽(yáng)h5小程序開發(fā)搭建,簡(jiǎn)陽(yáng)網(wǎng)站營(yíng)銷推廣歡迎簡(jiǎn)陽(yáng)等地區(qū)企業(yè)咨詢

本文在centos6.8下,通過一個(gè)實(shí)例演示fastdfs_in_docker工程的使用方法,利用docker搭建一個(gè)fastdfs集群環(huán)境。部署結(jié)構(gòu)為:

docker下怎么搭建fastdfs分布式集群

1、前提條件

1)所有機(jī)器均能連接外網(wǎng)

2)已安裝docker,具體看參考

  docker下怎么搭建fastdfs分布式集群

3)已安裝git

4)防火墻開放對(duì)下面要使用的端口(端口在fastdfs集群?jiǎn)?dòng)前開放即可)

2、搭建步驟

2.1 所有機(jī)器上執(zhí)行:

git clone https://git.oschina.net/zjg23/fastdfs_in_docker.git;#從git服務(wù)器下載工程
mkdir -p /home/fastdfs/{tracker,storage};                     #這兩個(gè)路徑用來掛載到docker容器,尤其是/home/fastdfs/storage路徑要保證有足夠的存儲(chǔ)空間
cd fastdfs_in_docker;
docker build -t zjg23/fastdfs:2.0 .;                          #構(gòu)建鏡像

下圖表示鏡像構(gòu)建成功

docker下怎么搭建fastdfs分布式集群

2.2 構(gòu)建tracker,192.168.5.128上執(zhí)行:

docker run -d --name fdfs_tracker -v /home/fastdfs/tracker:/export/fastdfs/tracker --net=host -e TRACKER_BASE_PATH=/export/fastdfs/tracker -e TRACKER_PORT=22123 zjg23/fastdfs:2.0 sh /usr/local/src/tracker.sh

2.3 構(gòu)建storage

2.3.1 192.168.5.129上執(zhí)行:
docker run -d --name fdfs_storage -v /home/fastdfs/storage:/export/fastdfs/storage --net=host -e STORAGE_PORT=23001 -e STORAGE_BASE_PATH=/export/fastdfs/storage -e STORAGE_PATH0=/export/fastdfs/storage -e TRACKER_SERVER=192.168.5.128:22123 -e GROUP_COUNT=2 -e HTTP_SERVER_PORT=8080 -e GROUP_NAME=group1 zjg23/fastdfs:2.0 sh /usr/local/src/storage.sh
2.3.2 192.168.5.130上執(zhí)行:
docker run -d --name fdfs_storage -v /home/fastdfs/storage:/export/fastdfs/storage --net=host -e STORAGE_PORT=23001 -e STORAGE_BASE_PATH=/export/fastdfs/storage -e STORAGE_PATH0=/export/fastdfs/storage -e TRACKER_SERVER=192.168.5.128:22123 -e GROUP_COUNT=2 -e HTTP_SERVER_PORT=8080 -e GROUP_NAME=group1 zjg23/fastdfs:2.0 sh /usr/local/src/storage.sh
2.3.3 192.168.5.131上執(zhí)行:
docker run -d --name fdfs_storage -v /home/fastdfs/storage:/export/fastdfs/storage --net=host -e STORAGE_PORT=23001 -e STORAGE_BASE_PATH=/export/fastdfs/storage -e STORAGE_PATH0=/export/fastdfs/storage -e TRACKER_SERVER=192.168.5.128:22123 -e GROUP_COUNT=2 -e HTTP_SERVER_PORT=8080 -e GROUP_NAME=group2 zjg23/fastdfs:2.0 sh /usr/local/src/storage.sh
2.3.4 192.168.5.132上執(zhí)行:
docker run -d --name fdfs_storage -v /home/fastdfs/storage:/export/fastdfs/storage --net=host -e STORAGE_PORT=23001 -e STORAGE_BASE_PATH=/export/fastdfs/storage -e STORAGE_PATH0=/export/fastdfs/storage -e TRACKER_SERVER=192.168.5.128:22123 -e GROUP_COUNT=2 -e HTTP_SERVER_PORT=8080 -e GROUP_NAME=group2 zjg23/fastdfs:2.0 sh /usr/local/src/storage.sh

命令的解釋:

docker下怎么搭建fastdfs分布式集群

3、檢查是否搭建成功

docker下怎么搭建fastdfs分布式集群

docker下怎么搭建fastdfs分布式集群

docker下怎么搭建fastdfs分布式集群

結(jié)果如下,說明我們已經(jīng)按照預(yù)期部署架構(gòu)正確的完成安裝

docker下怎么搭建fastdfs分布式集群

docker下怎么搭建fastdfs分布式集群

docker下怎么搭建fastdfs分布式集群

docker下怎么搭建fastdfs分布式集群

docker下怎么搭建fastdfs分布式集群

每個(gè)storage上裝有nginx,所以文件也可以通過http的方式直接訪問

docker下怎么搭建fastdfs分布式集群

docker下怎么搭建fastdfs分布式集群

4、項(xiàng)目地址

https://git.oschina.net/zjg23/fastdfs_in_docker.git

如果文章中的圖片,附件不能查看,可直接查看工程中的文檔:

docker下怎么搭建fastdfs分布式集群

感謝各位的閱讀,以上就是“docker下怎么搭建fastdfs分布式集群”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)docker下怎么搭建fastdfs分布式集群這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!


分享題目:docker下怎么搭建fastdfs分布式集群
轉(zhuǎn)載源于:http://www.dlmjj.cn/article/pjeodc.html