成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

FastDFS分布式文件系統的安裝及配置

運維 系統運維 分布式
分布式文件系統(Distributed File System)是指文件系統管理的物理存儲資源不一定直接連接在本地節點上,而是通過計算機網絡與節點相連。分布式文件系統的設計基于客戶機/服務器模式。

  分布式文件系統(Distributed File System)是指文件系統管理的物理存儲資源不一定直接連接在本地節點上,而是通過計算機網絡與節點相連。分布式文件系統的設計基于客戶機/服務器模式。一個典型的網絡可能包括多個供多用戶訪問的服務器。另外,對等特性允許一些系統扮演客戶機和服務器的雙重角色。

  FastDFS是一個開源的輕量級分布式文件系統,它對文件進行管理,功能包括:文件存儲、文件同步、文件訪問(文件上傳、文件下載)等,解決了大容量存儲和負載均衡的問題。特別適合以文件為載體的在線服務,如相冊網站、視頻網站等等。

  一:安裝FastDFS

  1、首先安裝libevent。

  1. wget http://monkey.org/~provos/libevent-2.0.11-stable.tar.gz  
  2. tar -zxvf libevent-2.0.11-stable.tar.gz  
  3. cd libevent-2.0.11-stable  
  4. ./configure --prefix=/usr  
  5. make clean  
  6. make  
  7. make install 

  2、安裝FastDFS的步驟

  1. wget http://fastdfs.googlecode.com/files/FastDFS_v3.03.tar.gz  
  2. tar -zxvf FastDFS_v3.03.tar.gz  
  3. cd FastDFS  
  4. vim make.sh 將#WITH_HTTPD=1 修改成WITH_HTTPD=1 以支持 http  
  5. ./make.sh  
  6. ./make.sh install 

  二:FastDFS的配置

  1、配置及啟動Tracker Server:

  1. mkdir /home/fastdfs  
  2. vi /etc/fdfs/tracker.conf  
  3. base_path=/home/yuqing/fastdfs -> base_path=/home/fastdfs  
  4. http.server_port=8080 -> http.server_port=9090 
  5. ##include http.conf -> #include http.conf  
  6. reserved_storage_space = 4GB -> reserved_storage_space = 1GB 
  1. cd /usr/local/bin  
  2. fdfs_trackerd /etc/fdfs/tracker.conf 

檢查tracker是否啟動成功,可以查看如下文件/home/fastdfs/logs/trackerd.log:

  1. [2011-10-21 14:29:44] INFO - FastDFS v3.03, base_path=/home/fastdfs, run_by_group=, run_by_user=, connect_timeout=30snetwork_timeout=60sport=22122bind_addr=, max_connections=256work_threads=4store_lookup=2store_group=, store_server=0store_path=0reserved_storage_space=1024MBdownload_server=0allow_ip_count=-1, sync_log_buff_interval=10scheck_active_interval=120sthread_stack_size=64 KB, storage_ip_changed_auto_adjust=1storage_sync_file_max_delay=86400sstorage_sync_file_max_time=300suse_trunk_file=0slot_min_size=256slot_max_size=16 MB, trunk_file_size=64 MB  
  2. [2011-10-21 14:29:44] INFO - HTTP supported: server_port=9090default_content_type=application/octet-stream, anti_steal_token=0token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0check_active_interval=30check_active_type=tcpcheck_active_uri=/status.html 

  2、配置及啟動Storage Server:

  1. mkdir /home/fastdfs/fdfs_storage  
  2. cd /etc/fdfs  
  3. vi storage.conf  
  4. base_path=/home/yuqing/fastdfs -> /home/fastdfs/fdfs_storage  
  5. store_path0=/home/yuqing/fastdfs -> store_path0=/home/fastdfs/fdfs_storage  
  6. group_name=group1 
  7. tracker_server=192.168.209.121:22122 -> tracker_server=173.252.200.228:22122  
  8. ##include http.conf ->#include http.conf 

  接下來會出現很多mkdir data path,這是系統在創建數據目錄。

  1. [2011-10-21 14:49:20] INFO - FastDFS v3.03, base_path=/home/fastdfs/fdfs_storage, store_path_count=1subdir_count_per_path=256group_name=group1run_by_group=, run_by_user=, connect_timeout=30snetwork_timeout=60sport=23000bind_addr=, client_bind=1max_connections=256work_threads=4disk_rw_separated=1disk_reader_threads=1disk_writer_threads=1disk_rw_direct=0buff_size=256KBheart_beat_interval=30sstat_report_interval=60stracker_server_count=1sync_wait_msec=50mssync_interval=0mssync_start_time=00:00, sync_end_time=23:59, write_mark_file_freq=500allow_ip_count=-1, file_distribute_path_mode=0file_distribute_rotate_count=100fsync_after_written_bytes=0sync_log_buff_interval=10ssync_binlog_buff_interval=10ssync_stat_file_interval=300sthread_stack_size=512 KB, upload_priority=10if_alias_prefix=, check_file_duplicate=0, FDHT group count=0, FDHT server count=0, FDHT key_namespace=, FDHT keep_alive=0, HTTP server port=8888, domain name=  
  2. [2011-10-21 14:49:20] INFO - HTTP supported: server_port=8888http_trunk_size=262144default_content_type=application/octet-stream, anti_steal_token=0token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0 
  3. [2011-10-21 14:49:42] INFO - file: storage_param_getter.c, line: 97, storage_ip_changed_auto_adjust=1store_path=0reserved_storage_space=1024 MB, use_trunk_file=0slot_min_size=0slot_max_size=16 MB, trunk_file_size=64 MB  
  4. [2011-10-21 14:49:44] INFO - file: tracker_client_thread.c, line: 304, successfully connect to tracker server 173.252.200.228:22122, as a tracker client, my ip is 173.252.200.228  
  5. [2011-10-21 14:50:14] INFO - file: tracker_client_thread.c, line: 1100, tracker server 173.252.200.228:22122, set tracker leader: 173.252.200.228:22122 

  三:測試及使用FastDFS

  1、FastDFS之配置client:

  1. vi /etc/fdfs/client.conf  
  2. base_path=/home/yuqing/fastdfs-> base_path=/home/fastdfs  
  3. tracker_server=192.168.209.121:22122 -> tracker_server=173.252.200.228:22122  
  4. http.tracker_server_port=8080 ->http.tracker_server_port=9090 
  5. ##include http.conf ->#include http.conf 

  2、測試上傳文件:

  1. cd ~  
  2. fdfs_test /etc/fdfs/client.conf upload FastDFS_v3.03.tar.gz 

  執行成功后會出現如下提示:

  1. This is FastDFS client test program v3.03  
  2.  
  3. Copyright (C) 2008, Happy Fish / YuQing  
  4.  
  5. FastDFS may be copied only under the terms of the GNU General  
  6. Public License V3, which may be found in the FastDFS source kit.  
  7. Please visit the FastDFS Home Page http://www.csource.org/  
  8. for more detail.  
  9.  
  10. [2011-10-21 15:14:59] INFO - base_path=/home/fastdfs, connect_timeout=30network_timeout=60tracker_server_count=1anti_steal_token=0, anti_steal_secret_key length=0 
  11.  
  12. tracker_query_storage_store_list_without_group:  
  13. server 1. group_name=group1ip_addr=173.252.200.228, port=23000 
  14.  
  15. group_name=group1ip_addr=173.252.200.228, port=23000 
  16. storage_upload_by_filename  
  17. group_name=group1remote_filename=M00/00/00/rfzI5E6hG_O5wNKxAAVAc72y1Jc.tar.gz  
  18. source ip address: 173.252.200.228  
  19. file timestamp=2011-10-21 15:14:59  
  20. file size=344179 
  21. file crc32=3182613655 
  22. file url: http://173.252.200.228:9090/group1/M00/00/00/rfzI5E6hG_O5wNKxAAVAc72y1Jc.tar.gz  
  23. storage_upload_slave_by_filename  
  24. group_name=group1remote_filename=M00/00/00/rfzI5E6hG_O5wNKxAAVAc72y1Jc_big.tar.gz  
  25. source ip address: 173.252.200.228  
  26. file timestamp=2011-10-21 15:14:59  
  27. file size=344179 
  28. file crc32=3182613655 
  29. file url: http://173.252.200.228:9090/group1/M00/00/00/rfzI5E6hG_O5wNKxAAVAc72y1Jc_big.tar.gz 

  3、測試下載文件

  在瀏覽器中,輸入上圖中的url地址,tracker server會自動重定向到存儲文件的storage server,文件下載成功。至此,已經成功搭建了FastDFS,編寫你自己的client來進行訪問吧!

責任編輯:黃丹 來源: lxy.me
相關推薦

2012-10-09 16:43:47

FastDFS分布式文件系統

2012-05-10 14:04:07

分布式文件系統架構

2012-10-11 14:31:57

FastDFSMogileFS

2010-11-01 05:50:46

分布式文件系統

2018-01-18 17:14:58

分布式文件系統FastDFS

2014-01-10 10:39:35

分布式文件系統TFS

2014-06-24 15:24:52

Moosefs分布式集群

2014-01-15 13:56:28

分布式文件系統TFS淘寶

2014-01-14 15:56:54

分布式文件系統TFS淘寶

2013-05-27 14:46:06

文件系統分布式文件系統

2017-10-17 08:33:31

存儲系統分布式

2012-05-10 15:23:53

分布式文件系統測試

2012-08-31 16:04:11

HDFS分布式文件系統

2013-06-18 14:00:59

HDFS分布式文件系統

2010-11-15 13:24:07

分布式文件系統

2013-01-07 10:29:31

大數據

2012-09-19 15:05:24

MogileFS分布式文件系統

2010-06-04 18:45:43

Hadoop分布式文件

2012-09-19 13:43:13

OpenAFS分布式文件系統

2014-01-15 16:49:48

分布式文件系統TFS淘寶
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 日本不卡免费新一二三区 | 91视频网址 | 欧美日韩一区二区三区四区 | 国产高清在线观看 | 人人做人人澡人人爽欧美 | 欧美视频日韩 | 黑人巨大精品欧美一区二区一视频 | 九色91视频 | 国产欧美一区二区三区另类精品 | 欧美激情 一区 | 亚洲人成人一区二区在线观看 | 欧美久久视频 | 日日干夜夜操天天操 | 欧美精品在线播放 | 精品亚洲一区二区三区四区五区高 | 亚洲高清一区二区三区 | 亚洲视频一区在线观看 | 国产欧美一级二级三级在线视频 | 日韩视频在线免费观看 | av免费网站在线观看 | 久久精品一 | 国产一区二区精品在线 | 西西裸体做爰视频 | 欧美乱大交xxxxx另类电影 | 亚洲天堂一区二区 | 午夜影院| 日韩精品网站 | 五月综合激情网 | 中文字幕免费视频 | 亚洲精品成人在线 | 日韩第1页| 情侣黄网站免费看 | 久久久国产一区二区三区四区小说 | 1区2区3区视频 | 国产亚韩| 国产精品久久久久久久久久久免费看 | 欧美在线综合 | 精品国产成人 | av特级毛片 | av在线免费观看网站 | 成人免费视频观看视频 |