下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、FastDFS 安裝使用實(shí)戰(zhàn)二(配置篇)FastDFS 安裝使用實(shí)戰(zhàn)二(配置篇) Keywords:FastDFS 、 分布式文件系統(tǒng)、 UbuntuAuthor:soartju 轉(zhuǎn)載請(qǐng)注明出 處 :FastDFS 的配置文件在 %FastDFS%/conf 目錄下,其中包括 Client.conf 客戶端上傳配置文件 Storage.conf文件存儲(chǔ)服務(wù)器配置文件Tracker.conf負(fù)責(zé)均衡調(diào)度服務(wù)器配置文件http.conf http 服務(wù)器配置文件配置文件需要根據(jù)服 務(wù)器環(huán)境的不同,進(jìn)行不同的配置,具體可以參考 FastDFS 官方的安裝配置文檔 ,以及 FastDFS 原 理介紹文
2、檔 在 本例中, Tracker Server,Storage Server 都安裝在一臺(tái)服務(wù)器 上, IP:51 、配置及啟動(dòng) Tracker ServerA 、修改FastDFS%/conf/tracker.conf 文件,修改如下 #可以自己指定目錄位置,但目錄必須存在,用于存儲(chǔ)日志 及 storage server 等信息,否則 tracker server 無法啟動(dòng) Txt 代 碼 base_path=/home/yuqing/fastdfs ->base_path=/home/soar/fastdfs_tracker#改成你想要的 http端口,將來 http
3、 下載文件的端口就是他了 Txt 代碼http.server_port=8080 -> http.server_port=8090 #http 支 持 Txt 代碼 #include http.conf -> #include http.conf # 默認(rèn) 4GB ,如果空間不足, 建議調(diào)小, 否則會(huì)報(bào) no free space 的異常,無法正常啟動(dòng) Txt 代碼 reserved_storage_space = 4GB -> reserved_storage_space = 1GB #tracker server 對(duì) storage server 供服務(wù)的端口,使用默認(rèn)的
4、即可,也可以自 定義 Txt 代碼 port=22122B 、將 http.conf 文件拷貝到/etc/fdfs 目錄下,執(zhí)行 Shell 代碼 sudo cp %FastDFS%/conf/http.conf /etc/fdfs/ 注:為了支持 http , 必須將這個(gè)文件拷貝到此目錄,否則無法啟動(dòng),報(bào) param http.XXX not exist or is empty 類似的錯(cuò)誤C、進(jìn)入/usr/local/bin/目錄,啟動(dòng)tracker服務(wù)器,執(zhí)行 Shell 代碼 sudo fdfs_trackerd %FastDFS%/conf/tracker.confD、進(jìn)入 /home
5、/soar/fastdfs_tracker/logs/trackerdog 查看 tracker 的啟動(dòng)日志, 如果看到類似 Shell 代碼 2010-11-04 16:21:25 INFO - FastDFS v2.02, base_path=/home/soar/fastdfs_tracker, connect_timeout=30s, network_timeout=60s, port=22122, bind_addr=, max_connections=256, work_threads=4, store_lookup=2, store_group=, store_server=0,
6、 store_path=0, reserved_storage_space=4MB, 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 2010-11-04 16:21:25 INFO - HTTP suppo
7、rted: server_port=8090, default_content_type=application/octet-stream, anti_steal_token=0, token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0, check_active_interval=30, check_active_type=tcp, check_active_uri=/status.html 恭喜 你, tracker server
8、 已經(jīng)啟動(dòng)成功! 2、配置及啟動(dòng) StorageServerA、修改 FastDFS%/conf/storage.conf 文件,修改如下: #可以自定義,但必須存在此目錄,用于存儲(chǔ)storage 相關(guān)的log、 group 內(nèi)的相關(guān)信息 Txt 代碼 base_path=/home/yuqing/fastdfs ->/home/soar/fastdfs_storge #文件的存儲(chǔ)位置,在一臺(tái) storage server 上可以指定多個(gè)存儲(chǔ)位置 Txt 代碼 store_path0=/home/yuqing/fastdfs ->store_path0=/home/soar/fas
9、tdfs_storge #必須指定 Txt 代碼 group_name=group1#修改成 tracker server 的 IP 和端口信息 Txt 代碼 tracker_server=21:22122 -> tracker_server=5:22122 #http 支持 Txt 代碼#include http.conf ->#include http.conf B、進(jìn)入/usr/local/bin/ 目錄,啟動(dòng) storage 服務(wù)器,執(zhí)行 Shell 代碼 sudo fdfs_storaged %FastDFS%/conf/stor
10、age.confC、進(jìn)入/home/soar/fastdfs_tracker/logs/storage.log 查看 storage 月服務(wù)器 啟動(dòng)日志,如果看到類似 Shell 代碼 2010-11-04 16:37:16 INFO - FastDFS v2.02, base_path=/home/soar/fastdfs_storge, store_path_count=1, subdir_count_per_path=256, group_name=group1, connect_timeout=30s, network_timeout=60s, port=23000, bind_add
11、r=, client_bind=1, max_connections=256, 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=1, sync_wait_msec=200ms, sync_interval=0ms, sync_start_time=00:00, sync_end_time=23:59,
12、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=60s, sync_stat_file_interval=300s, thread_stack_size=512 KB, upload_priority=10, if_alias_prefix=, check_file
13、_duplicate=0, FDHT group count=0, FDHT server count=0, FDHT key_namespace=, FDHT keep_alive=0, HTTP server port=8888, domain name=2010-11-04 16:37:16 INFO - HTTP supported: server_port=8888, http_trunk_size=262144, default_content_type=application/octet-stream, anti_steal_token=0, token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0 2010-11-04 16:37:16 INFO - file: storage_param_getter.c, line: 48, storage_ip_
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025版寧夏糧食和物資儲(chǔ)備局糧食儲(chǔ)備庫信息化系統(tǒng)升級(jí)合同3篇
- 2025年度排水工程設(shè)計(jì)咨詢合同4篇
- 2025年度綠色環(huán)保產(chǎn)業(yè)民營中小企業(yè)合作開發(fā)合同4篇
- 技術(shù)保密合同
- 承包人合同范本(2篇)
- 2025年度高品質(zhì)內(nèi)墻抹灰裝飾工程承包合同4篇
- 2025版內(nèi)蒙古生態(tài)環(huán)保產(chǎn)業(yè)投資合同范本4篇
- 二零二五年度農(nóng)產(chǎn)品質(zhì)量檢測(cè)與追溯服務(wù)合同4篇
- 2025版牛羊肉冷鏈物流配送服務(wù)合同4篇
- 二零二五年度回遷房買賣合同標(biāo)準(zhǔn)樣本(產(chǎn)權(quán)互換版)2篇
- 2025年度公務(wù)車輛私人使用管理與責(zé)任協(xié)議書3篇
- 經(jīng)濟(jì)學(xué)基礎(chǔ)試題及答案 (二)
- 售后工程師述職報(bào)告
- 綠化養(yǎng)護(hù)難點(diǎn)要點(diǎn)分析及技術(shù)措施
- 2024年河北省高考?xì)v史試卷(含答案解析)
- 車位款抵扣工程款合同
- 小學(xué)六年級(jí)數(shù)學(xué)奧數(shù)題100題附答案(完整版)
- 湖南高速鐵路職業(yè)技術(shù)學(xué)院?jiǎn)握新殬I(yè)技能測(cè)試參考試題庫(含答案)
- 英漢互譯單詞練習(xí)打印紙
- 2023湖北武漢華中科技大學(xué)招聘實(shí)驗(yàn)技術(shù)人員24人筆試參考題庫(共500題)答案詳解版
- 一氯二氟甲烷安全技術(shù)說明書MSDS
評(píng)論
0/150
提交評(píng)論