1. 程式人生 > >分散式檔案系統FastDFS配置與使用

分散式檔案系統FastDFS配置與使用

       FastDFS 是一個用C語言編寫的分散式檔案系統,剛開始接觸FastDFS的時候,是因為檔案同步。後來發現自己完全理解錯誤,FastDFS並不是Rsync那樣檔案同步,但是既然開始了就繼續深入瞭解她。FastDFS支援的檔案同步是把檔案上傳到排程器(tracker),然後按照管理員設定把檔案下發到其中一臺檔案儲存器(storage),成功後把檔案同步到其他各臺機器。FastDFS也可以作為檔案儲存、檔案上傳下載等,可以解決檔案服務叢集的分散式部署與負載均衡。一個典型的例子是充當圖片伺服器,為論壇、電商等提供高速可靠的圖片服務。FastDFS 客戶端開發也支援多語言(C、python、java、php等)API,為專案開發提供便利。


1、系統環境

       三臺Centos_X64_6.5,一個tracker,兩個storage,其中一臺機器也模仿client的角色,FastDFS原始碼安裝5.05版本。注意:三臺機器都要安裝FastDFS,而根據對應所在系統的角色配置相關配置檔案,然後啟動fdfs_trackerd、fdfs_storaged服務。

2、FastDFS安裝過程

       以原始碼方式安裝,需要提前安裝C語言開發環境,還要安裝cmake環境等,使用yum命令安裝以上開發工具也比較方便,如:yum install cmake gcc git。

2.1安裝依賴庫

安裝libevent命令列輸入下命令完成安裝:
[
[email protected]
Desktop]# mkdir FastNFS [[email protected] Desktop]# cd FastNFS/ [[email protected] FastNFS]# git clone https://github.com/libevent/libevent.git [[email protected] libevent]# rpm -qa libevent [[email protected] libevent]# rpm -qa|grep libevent rpm -e libevent* [[email protected]
FastNFS]# cd libevent [[email protected] libevent]# cd cmake [[email protected] cmake]# yum install cmake [[email protected] cmake]# cmake .. [[email protected] cmake]# make [[email protected] cmake]# make install

安裝libfastcommon,命令列輸入下命令完成安裝:
[[email protected] FastNFS]# git clone https://github.com/happyfish100/libfastcommon.git
[[email protected] FastNFS]# cd libfastcommon
[[email protected] libfastcommon]# ./make.sh
[[email protected] libfastcommon]# ./make.sh install

列印如下面內容即安裝成功:
mkdir -p /usr/lib64
mkdir -p /usr/lib
install -m 755 libfastcommon.so /usr/lib64
install -m 755 libfastcommon.so /usr/lib
mkdir -p /usr/include/fastcommon
install -m 644 common_define.h hash.h chain.h logger.h base64.h shared_func.h pthread_func.h ini_file_reader.h _os_define.h sockopt.h sched_thread.h http_func.h md5.h local_ip_func.h avl_tree.h ioevent.h ioevent_loop.h fast_task_queue.h fast_timer.h process_ctrl.h fast_mblock.h connection_pool.h fast_mpool.h fast_allocator.h fast_buffer.h skiplist.h multi_skiplist.h flat_skiplist.h skiplist_common.h system_info.h fast_blocked_queue.h php7_ext_wrapper.h /usr/include/fastcommon


2.2安裝FastDFS

下載原始碼包、解壓、進入目錄完成安裝:
[[email protected] FastNFS]# wget https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz
[[email protected] FastNFS]# tar -zxvf V5.05.tar.gz
[[email protected] FastNFS]# cd fastdfs-5.05
[[email protected] fastdfs-5.05]# ./make.sh
[[email protected] fastdfs-5.05]# ./make.sh install

列印如下面內容即安裝成功:
mkdir -p /usr/bin
mkdir -p /etc/fdfs
cp -f fdfs_trackerd /usr/bin
if [ ! -f /etc/fdfs/tracker.conf.sample ]; then cp -f ../conf/tracker.conf /etc/fdfs/tracker.conf.sample; fi
mkdir -p /usr/bin
mkdir -p /etc/fdfs
cp -f fdfs_storaged  /usr/bin
if [ ! -f /etc/fdfs/storage.conf.sample ]; then cp -f ../conf/storage.conf /etc/fdfs/storage.conf.sample; fi
mkdir -p /usr/bin
mkdir -p /etc/fdfs
mkdir -p /usr/lib64
cp -f fdfs_monitor fdfs_test fdfs_test1 fdfs_crc32 fdfs_upload_file fdfs_download_file fdfs_delete_file fdfs_file_info fdfs_appender_test fdfs_appender_test1 fdfs_append_file fdfs_upload_appender /usr/bin
if [ 0 -eq 1 ]; then cp -f libfdfsclient.a /usr/lib64; fi
if [ 1 -eq 1 ]; then cp -f libfdfsclient.so /usr/lib64; fi
mkdir -p /usr/include/fastdfs
cp -f ../common/fdfs_define.h ../common/fdfs_global.h ../common/mime_file_parser.h ../common/fdfs_http_shared.h ../tracker/tracker_types.h ../tracker/tracker_proto.h ../tracker/fdfs_shared_func.h ../storage/trunk_mgr/trunk_shared.h tracker_client.h storage_client.h storage_client1.h client_func.h client_global.h fdfs_client.h /usr/include/fastdfs
if [ ! -f /etc/fdfs/client.conf.sample ]; then cp -f ../conf/client.conf /etc/fdfs/client.conf.sample; fi

檢視FastDFS安裝後的配置檔案:
[[email protected] fastdfs-5.05]# ll /etc/fdfs/

列印輸出下面資訊:
total 20
-rw-r--r--. 1 root root 1461 Mar 21 03:01 client.conf.sample
-rw-r--r--. 1 root root 7829 Mar 21 03:01 storage.conf.sample
-rw-r--r--. 1 root root 7102 Mar 21 03:01 tracker.conf.sample


3、FastDFS簡單配置

3.1配置tracker

建立配置檔案:
[[email protected] fastdfs-5.05]# cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf

建立base目錄
[[email protected] github.com]# mkdir -p /home/yuqing/fastdfs

開啟配置檔案,主要bind_addr、port、base_path配置幾個選項
[[email protected] fastdfs-5.05]# vi /etc/fdfs/tracker.conf

根據說明配置成下面內容:
disabled:是否關閉服務,false為不關閉服務
bind_addr:繫結的IP地址
port:繫結的埠地址

base_path:指定檔案儲存目錄

附上配置檔案內容,方便檢視解析說明:

# is this config file disabled
# false for enabled
# true for disabled
disabled=false


# bind an address of this host
# empty for bind all addresses of this host
bind_addr=


# the tracker server port
port=22122


# connect timeout in seconds
# default value is 30s
connect_timeout=30


# network timeout in seconds
# default value is 30s
network_timeout=60


# the base path to store data and log files
base_path=/home/yuqing/fastdfs


# max concurrent connections this server supported
max_connections=256


# accept thread count
# default value is 1
# since V4.07
accept_threads=1


# work thread count, should <= max_connections
# default value is 4
# since V2.00
work_threads=4


# the method of selecting group to upload files
# 0: round robin
# 1: specify group
# 2: load balance, select the max free space group to upload file
store_lookup=2


# which group to upload file
# when store_lookup set to 1, must set store_group to the group name
store_group=group2


# which storage server to upload file
# 0: round robin (default)
# 1: the first server order by ip address
# 2: the first server order by priority (the minimal)
store_server=0


# which path(means disk or mount point) of the storage server to upload file
# 0: round robin
# 2: load balance, select the max free space path to upload file
store_path=0


# which storage server to download file
# 0: round robin (default)
# 1: the source storage server which the current file uploaded to
download_server=0


# reserved storage space for system or other applications.
# if the free(available) space of any stoarge server in 
# a group <= reserved_storage_space, 
# no file can be uploaded to this group.
# bytes unit can be one of follows:
### G or g for gigabyte(GB)
### M or m for megabyte(MB)
### K or k for kilobyte(KB)
### no unit for byte(B)
### XX.XX% as ratio such as reserved_storage_space = 10%
reserved_storage_space = 10%


#standard log level as syslog, case insensitive, value list:
### emerg for emergency
### alert
### crit for critical
### error
### warn for warning
### notice
### info
### debug
log_level=info


#unix group name to run this program, 
#not set (empty) means run by the group of current user
run_by_group=


#unix username to run this program,
#not set (empty) means run by current user
run_by_user=


# allow_hosts can ocur more than once, host can be hostname or ip address,
# "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or
# host[01-08,20-25].domain.com, for example:
# allow_hosts=10.0.1.[1-15,20]
# allow_hosts=host[01-08,20-25].domain.com
allow_hosts=*


# sync log buff to disk every interval seconds
# default value is 10 seconds
sync_log_buff_interval = 10


# check storage server alive interval seconds
check_active_interval = 120


# thread stack size, should >= 64KB
# default value is 64KB
thread_stack_size = 64KB


# auto adjust when the ip address of the storage server changed
# default value is true
storage_ip_changed_auto_adjust = true


# storage sync file max delay seconds
# default value is 86400 seconds (one day)
# since V2.00
storage_sync_file_max_delay = 86400


# the max time of storage sync a file
# default value is 300 seconds
# since V2.00
storage_sync_file_max_time = 300


# if use a trunk file to store several small files
# default value is false
# since V3.00
use_trunk_file = false 


# the min slot size, should <= 4KB
# default value is 256 bytes
# since V3.00
slot_min_size = 256


# the max slot size, should > slot_min_size
# store the upload file to trunk file when it's size <=  this value
# default value is 16MB
# since V3.00
slot_max_size = 16MB


# the trunk file size, should >= 4MB
# default value is 64MB
# since V3.00
trunk_file_size = 64MB


# if create trunk file advancely
# default value is false
# since V3.06
trunk_create_file_advance = false


# the time base to create trunk file
# the time format: HH:MM
# default value is 02:00
# since V3.06
trunk_create_file_time_base = 02:00


# the interval of create trunk file, unit: second
# default value is 38400 (one day)
# since V3.06
trunk_create_file_interval = 86400


# the threshold to create trunk file
# when the free trunk file size less than the threshold, will create 
# the trunk files
# default value is 0
# since V3.06
trunk_create_file_space_threshold = 20G


# if check trunk space occupying when loading trunk free spaces
# the occupied spaces will be ignored
# default value is false
# since V3.09
# NOTICE: set this parameter to true will slow the loading of trunk spaces 
# when startup. you should set this parameter to true when neccessary.
trunk_init_check_occupying = false


# if ignore storage_trunk.dat, reload from trunk binlog
# default value is false
# since V3.10
# set to true once for version upgrade when your version less than V3.10
trunk_init_reload_from_binlog = false


# the min interval for compressing the trunk binlog file
# unit: second
# default value is 0, 0 means never compress
# FastDFS compress the trunk binlog when trunk init and trunk destroy
# recommand to set this parameter to 86400 (one day)
# since V5.01
trunk_compress_binlog_min_interval = 0


# if use storage ID instead of IP address
# default value is false
# since V4.00
use_storage_id = false


# specify storage ids filename, can use relative or absolute path
# since V4.00
storage_ids_filename = storage_ids.conf


# id type of the storage server in the filename, values are:
## ip: the ip address of the storage server
## id: the server id of the storage server
# this paramter is valid only when use_storage_id set to true
# default value is ip
# since V4.03
id_type_in_filename = ip


# if store slave file use symbol link
# default value is false
# since V4.01
store_slave_file_use_link = false


# if rotate the error log every day
# default value is false
# since V4.02
rotate_error_log = false


# rotate error log time base, time format: Hour:Minute
# Hour from 0 to 23, Minute from 0 to 59
# default value is 00:00
# since V4.02
error_log_rotate_time=00:00


# rotate error log when the log file exceeds this size
# 0 means never rotates log file by log file size
# default value is 0
# since V4.02
rotate_error_log_size = 0


# keep days of the log files
# 0 means do not delete old log files
# default value is 0
log_file_keep_days = 0


# if use connection pool
# default value is false
# since V4.05
use_connection_pool = false


# connections whose the idle time exceeds this time will be closed
# unit: second
# default value is 3600
# since V4.05
connection_pool_max_idle_time = 3600


# HTTP port on this tracker server
http.server_port=8080


# check storage HTTP server alive interval seconds
# <= 0 for never check
# default value is 30
http.check_alive_interval=30


# check storage HTTP server alive type, values are:
#   tcp : connect to the storge server with HTTP port only, 
#        do not request and get response
#   http: storage check alive url must return http status 200
# default value is tcp
http.check_alive_type=tcp


# check storage HTTP server alive uri/url
# NOTE: storage embed HTTP server support uri: /status.html
http.check_alive_uri=/status.html


3.2配置storage

建立配置檔案:
[[email protected] fastdfs-5.05]# cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf

建立base目錄:
[[email protected] fastdfs-5.05]# mkdir -p /home/yuqing/fastdfs

主要配置:group_name、bind_addr、base_path、store_path0、tracker_server
[[email protected] fastdfs-5.05]# vi /etc/fdfs/storage.conf
group_name:所在檔案組
bind_addr:服務地址
port:服務埠
base_path:檔案資料儲存與日誌目錄
store_path0:檔案資料儲存目錄,覆蓋base_path的檔案資料儲存目錄配置
tracker_server:排程器的地址埠,IP:Port的形式

其他選項與排程器類是,請繼續檢視storage的配置檔案。



3.3配置client

建立配置檔案:
[[email protected] fdfs]# cp /etc/fdfs/client.conf.sample client.conf

主要修改:base_path、tracker_server
[[email protected] fdfs]# vi /etc/fdfs/client.conf

配置檔案如下:
# connect timeout in seconds
# default value is 30s
connect_timeout=30


# network timeout in seconds
# default value is 30s
network_timeout=60


# the base path to store log files
base_path=/home/yuqing/fastdfs


# tracker_server can ocur more than once, and tracker_server format is
#  "host:port", host can be hostname or ip address
tracker_server=192.168.213.161:22122


#standard log level as syslog, case insensitive, value list:
### emerg for emergency
### alert
### crit for critical
### error
### warn for warning
### notice
### info
### debug
log_level=info


# if use connection pool
# default value is false
# since V4.05
use_connection_pool = false


# connections whose the idle time exceeds this time will be closed
# unit: second
# default value is 3600
# since V4.05
connection_pool_max_idle_time = 3600


# if load FastDFS parameters from tracker server
# since V4.05
# default value is false
load_fdfs_parameters_from_tracker=false


# if use storage ID instead of IP address
# same as tracker.conf
# valid only when load_fdfs_parameters_from_tracker is false
# default value is false
# since V4.05
use_storage_id = false


# specify storage ids filename, can use relative or absolute path
# same as tracker.conf
# valid only when load_fdfs_parameters_from_tracker is false
# since V4.05
storage_ids_filename = storage_ids.conf




#HTTP settings
http.tracker_server_port=80


#use "#include" directive to include HTTP other settiongs
##include http.conf


4、啟動服務

4.1啟動排程器

命令列輸入:
[[email protected] fastdfs-5.05]# fdfs_trackerd /etc/fdfs/tracker.conf 

檢視日誌
[[email protected] fastdfs-5.05]# cat  /home/yuqing/fastdfs/logs/trackerd.log 

列印如下:
[2016-03-21 23:12:16] INFO - FastDFS v5.05, base_path=/home/yuqing/fastdfs, run_by_group=, run_by_user=, connect_timeout=30s, network_timeout=60s, port=22122, bind_addr=192.168.213.161, max_connections=256, accept_threads=1, work_threads=4, store_lookup=2, store_group=, store_server=0, store_path=0, reserved_storage_space=10.00%, 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, use_trunk_file=0, slot_min_size=256, slot_max_size=16 MB, trunk_file_size=64 MB, trunk_create_file_advance=0, trunk_create_file_time_base=02:00, trunk_create_file_interval=86400, trunk_create_file_space_threshold=20 GB, trunk_init_check_occupying=0, trunk_init_reload_from_binlog=0, trunk_compress_binlog_min_interval=0, use_storage_id=0, id_type_in_filename=ip, storage_id_count=0, rotate_error_log=0, error_log_rotate_time=00:00, rotate_error_log_size=0, log_file_keep_days=0, store_slave_file_use_link=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s

檢視程序:
[[email protected] fastdfs-5.05]# ps -ef |grep track 

列印如下:
root     12839     1  0 23:12 ?        00:00:00 fdfs_trackerd /etc/fdfs/tracker.conf
root     12884  5571  0 23:15 pts/2    00:00:00 grep track

檢視fdfs服務
[[email protected] fastdfs-5.05]# netstat -ntpl |grep fdfs 

列印如下:
tcp        0      0 192.168.213.161:22122       0.0.0.0:*                   LISTEN      12839/fdfs_trackerd 

4.2啟動檔案儲存

命令列輸入:
[[email protected] fastdfs-5.05]# fdfs_storaged /etc/fdfs/storage.conf

檢視日誌
[[email protected] fastdfs-5.05]# cat  /home/yuqing/fastdfs/logs/storaged.log 

列印如下:
[2016-03-21 23:31:50] INFO - FastDFS v5.05, base_path=/home/yuqing/fastdfs, store_path_count=1, subdir_count_per_path=256, group_name=group1, run_by_group=, run_by_user=, connect_timeout=30s, network_timeout=60s, port=23000, bind_addr=192.168.213.136, client_bind=1, max_connections=256, accept_threads=1, 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=50ms, sync_interval=0ms, sync_start_time=00:00, sync_end_time=23:59, 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=10s, sync_stat_file_interval=300s, thread_stack_size=512 KB, upload_priority=10, if_alias_prefix=, check_file_duplicate=0, file_signature_method=hash, FDHT group count=0, FDHT server count=0, FDHT key_namespace=, FDHT keep_alive=0, HTTP server port=8888, domain name=, use_access_log=0, rotate_access_log=0, access_log_rotate_time=00:00, rotate_error_log=0, error_log_rotate_time=00:00, rotate_access_log_size=0, rotate_error_log_size=0, log_file_keep_days=0, file_sync_skip_invalid_record=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s
data path: /home/yuqing/fastdfs/data, mkdir sub dir...
mkdir data path: 00 ...
mkdir data path: 01 ...
mkdir data path: 02 ...
mkdir data path: 03 ...
mkdir data path: 04 ...
mkdir data path: 05 ...
mkdir data path: 06 ...

檢視程序:
[[email protected] fastdfs-5.05]# ps -ef |grep fdfs

列印如下:
root     16280     1  0 23:32 ?        00:00:00 fdfs_storaged /etc/fdfs/storage.conf
root     16310  1185  0 23:33 pts/2    00:00:00 grep fdfs

檢視fdfs服務:
[[email protected] fastdfs-5.05]# netstat -ntpl |grep fdfs 

列印如下:
tcp        0      0 192.168.213.136:23000       0.0.0.0:*                   LISTEN      16280/fdfs_storaged 


5、測試FastDFS功能

在配置了client配置檔案的機器上面進行上傳檔案測試,結果應該返回上傳檔案的儲存路徑以及檔名,檢視兩臺檔案儲存器上相同目錄下以相同的檔名儲存上傳的檔案。

使用client上傳檔案命令,將返回檔案上傳結果,檔案的儲存目錄、檔名等資訊:

上傳檔案:

[[email protected] Desktop]# fdfs_upload_file /etc/fdfs/client.conf index.html
列印資訊,是檔案上傳路徑與檔名:
group1/M00/00/00/wKjVh1bw-1KADEceAAAsSKZJhlk53.html

驗證測試結果,兩臺檔案伺服器擁有相同的檔案。

storage檢視上傳檔案:

[[email protected] 00]# ll /home/yuqing/fastdfs/data/00/00/
列印資訊存在client上傳的檔案wKjVh1bw-1KADEceAAAsSKZJhlk53.html:
total 24
-rw-r--r--. 1 root root 11336 Mar 22 00:59 wKjVh1bw-1KADEceAAAsSKZJhlk53.html
-rw-r--r--. 1 root root 11336 Mar 22 01:05 wKjViFbw_LyAIv-oAAAsSKZJhlk82.html

   

6、說明

FastDFS自帶訪問檔案服務http功能,在安裝的時候有相關配置選項,如果打開了該http服務功能,可以按照client返回的上傳檔案儲存路徑以及檔名,在瀏覽器可以直接訪問。

相關推薦

分散式檔案系統FastDFS配置使用

       FastDFS 是一個用C語言編寫的分散式檔案系統,剛開始接觸FastDFS的時候,是因為檔案同步。後來發現自己完全理解錯誤,FastDFS並不是Rsync那樣檔案同步,但是既然開始了就繼續深入瞭解她。FastDFS支援的檔案同步是把檔案上傳到排程器(trac

CentOS 7 安裝配置分散式檔案系統 FastDFS 5.11

            CentOS 7  安裝配置分散式檔案系統  FastDFS 5.11 前言:     FastDFS是現在比較流行的分散式檔案系

檔案系統FastDFS安裝配置(單機)

安裝包如下: fastdfs-nginx-module_v1.16.tar.gz FastDFS_v5.05.tar.gz libfastcommon-master.zip nginx-1.8.0.tar.gz 一、安裝libfastcommon FastDFS 5.05

fastDfs 分散式檔案服務 安裝配置使用

先貼一波原理圖片 所有需要填寫IP的 地方全部寫公網IP 一、 FastDFS tracker部署 1.上傳FastDFS_v5.01.tar.gz至伺服器/usr/local/src目錄下; 2.依次執行以下命令 cd /usr/local/src tar xf

CentOS 7 安裝配置分散式檔案系統 FastDFS

前言 專案中用到檔案伺服器,有朋友推薦用FastDFS,所以就瞭解學習了一番,感覺確實頗為強大,在此再次感謝淘寶資深架構師餘慶大神開源瞭如此優秀的輕量級分散式檔案系統,本篇文章就記錄一下FastDFS的最新版本5.0.5在CentOS7中的安裝與配置。 簡介 首先簡

CentOS 7 安裝配置分散式檔案系統 FastDFS 5.11

            CentOS 7  安裝配置分散式檔案系統  FastDFS 5.11 前言:     FastDFS是現在比較流行的分散式檔案系統,很多網際網路公司比較青睞於它,我們公司由之前的ZIMG現在轉FastDFS,下面來講講簡單的安裝配置過程。

FastDFSFastDFS 分散式檔案系統的安裝使用,看這一篇就夠了!!

## 寫在前面 > 有不少小夥伴在實際工作中,對於如何儲存檔案(圖片、視訊、音訊等)沒有一個很好的解決思路。都明白不能將檔案儲存在單臺伺服器的磁碟上,也知道需要將檔案進行副本備份。如果自己手動寫檔案的副本機制,那就太麻煩了,這會涉及冗餘副本機制、伺服器的排程、副本檢測、伺服器節點檢測、檔案副本存放策略

分散式檔案系統FastDFS簡介、搭建、SpringBoot整合實現圖片上傳

之前大學時搭建過一個FastDFS的圖片伺服器,當時只是抱著好奇的態度搭著玩一下,當時搭建採用了一臺虛擬機器,tracker和storage服務在一臺機器上放著,最近翻之前的部落格突然想著在兩臺機器上搭建試一下,順便整合了SpringBoot實現了一下圖片的上傳服務。 新的閱讀體驗地址:http://www

分散式檔案系統FastDFS詳解

本文轉載自:Ubuntu下FastDFS分散式檔案系統配置與部署 Ubuntu下FastDFS分散式檔案系統配置與部署 白寧超 2017年4月15日09:11:52 摘要: FastDFS是一個開源的輕量級分散式檔案系統,功能包括:檔案儲存、檔案同步、檔案訪問(檔案上傳、檔案下載)等,

fastdfs操作,基礎知識, 分散式檔案系統fastdfs

fastdfs概念圖 fastdfs操作順序 fastdfs 安裝 //查詢: docker search fastdfs //下載: docker pull season/fastdfs // 本機方

一文講解分散式檔案系統FastDFS,以後不要再說不知道了!

為什麼要使用分散式檔案系統呢? 嗯,這個問題問的好,使用了它對我們有哪些好處?帶著這個問題我們來往下看: 單機時代 初創時期由於時間緊迫,在各種資源有限的情況下,通常就直接在專案目錄下建立靜態資料夾,用於使用者存放專案中的檔案資源。如果按不同型別再細分,可以在專案目錄下再建立不同

Hadoop HDFS分散式檔案系統設計要點架構

Hadoop簡介:一個分散式系統基礎架構,由Apache基金會開發。使用者可以在不瞭解分散式底層細節的情況下,開發分散式程式。充分利用叢集的威力高速運算和儲存。Hadoop實現了一個分散式檔案系統(Hadoop Distributed File System),簡稱HDFS。HDFS有著高容錯性的特點,並

分散式檔案系統FastDFS

什麼是FastDFS FastDFS是用c語言編寫的一款開源的分散式檔案系統。FastDFS為網際網路量身定製,充分考慮了冗餘備份、負載均衡、線性擴容等機制,並注重高可用、高效能等指標,使用FastD

Docker搭建分散式檔案系統fastDFS及SpringBoot整合fastDFS

docker安裝fastdfs映象 docker pull morunchang/fastdfs 執行tracker docker run -d --name tracker --net=host morunchang/fastdfs sh tr

分散式檔案系統FastDFS設計原理

tracker傳送download請求給某個tracker,必須帶上檔名資訊,tracke從檔名中解析出檔案的group、大小、建立時間等資訊,然後為該請求選擇一個storage用來服務讀請求。由於group內的檔案同步時在後臺非同步進行的,所以有可能出現在讀到時候,檔案還沒有同步到某些storage s

分散式檔案系統FastDFS快速入門

跟蹤伺服器,主要做排程工作,起負載均衡的作用。負責管理所有的storageserver和group,每個storage在啟動後會連線tracker,告訴tracker自己所屬的group,並保持週期性心跳,tracker根據storage的心跳資訊,建立對映表,tracke管理的元資料很少(tracker上的

FastDFS分散式檔案系統配置部署

一文搞定FastDFS分散式檔案系統配置與部署 閱讀目錄 1 分散式檔案系統介紹 2 系統架構介紹 3 FastDFS效能方案 4 Linux基本命令操作 5 安裝VirtualBox虛擬機器並配置Ubuntu

一文搞定FastDFS分散式檔案系統配置部署

相關文章 1 分散式檔案系統介紹 分散式檔案系統:Distributed file system, DFS,又叫做網路檔案系統:Network File System。一種允許檔案通過網路在多臺主機上分享的檔案系統,可讓多機器上的多使用者分享檔案和儲存空間。 特點:在一個分享的磁碟檔案系統中

分散式檔案系統fastdfsweedfs的對比

最近拿一臺雙核1G的kvm vps搭建了一個圖片的伺服器,前面用百度雲加速扛著,有了個專業圖片儲存及CDN的樣子。每天還是有50W左右的PV,流量在30G左右。總結一下最近接觸過的兩個分散式小檔案系統weedfs和fastdfs。 fastdfs的詳細介紹看這裡=》 傳

FastDFS分散式檔案系統安裝使用(單節點)

FastDFS是由淘寶的餘慶先生所開發,是一個輕量級、高效能的開源分散式檔案系統,用純C語言開發,包括檔案儲存、檔案同步、檔案訪問(上傳、下載)、存取負載均衡、線上擴容、相同內容只儲存一份等功能,適合有大容量儲存需求的應用或系統。做分散式系統開發時,其中要解