FastDFS安装部署

1、安装gcc编译器

yum install -y gcc

2、解压安装包

git clone https://github.com/happyfish100/libfastcommon.git

cd libfastcommon

./make.sh && ./make.sh install

上传fastdfs源码包到服务器,这里版本用fastdfs_v5.0.8.tar.gz

tar xf fastdfs_v5.0.8.tar.gz

cd FastDFS

./make.sh && ./make.sh install

3、进入FastDFS目录,执行./make.sh && ./make.sh install  程序安装完成。

4、配置tracter.conf配置文件

disabled=false

bind_addr=10.143.88.34

port=22122

connect_timeout=30

network_timeout=60

base_path=/space/fastdfs

max_connections=8172

#accept_threads=8

work_threads=8

store_lookup=2

store_group=group2

store_server=0

store_path=0

download_server=0

reserved_storage_space = 10%

log_level=info

run_by_group=

run_by_user=

allow_hosts=*

sync_log_buff_interval = 10

check_active_interval = 120

thread_stack_size = 64KB

storage_ip_changed_auto_adjust = true

storage_sync_file_max_delay = 86400

storage_sync_file_max_time = 300

use_trunk_file = false

slot_min_size = 256

slot_max_size = 16MB

trunk_file_size = 64MB

trunk_create_file_advance = false

trunk_create_file_time_base = 02:00

trunk_create_file_interval = 86400

trunk_create_file_space_threshold = 20G

trunk_init_check_occupying = false

trunk_init_reload_from_binlog = false

trunk_compress_binlog_min_interval = 0

use_storage_id = false

storage_ids_filename = storage_ids.conf

id_type_in_filename = ip

store_slave_file_use_link = false

rotate_error_log = false

error_log_rotate_time=00:00

rotate_error_log_size = 0

use_connection_pool = true

connection_pool_max_idle_time = 3600

http.server_port=8080

http.check_alive_interval=30

http.check_alive_type=tcp

http.check_alive_uri=/status.html

配置storage.conf配置文件

disabled=false

group_name=group1

bind_addr=

client_bind=true

port=23000

connect_timeout=30

network_timeout=60

heart_beat_interval=30

stat_report_interval=60

base_path=/space/images

max_connections=4096

buff_size = 256KB

accept_threads=1

work_threads=4

disk_rw_separated = true

disk_reader_threads = 1

disk_writer_threads = 1

sync_wait_msec=50

sync_interval=0

sync_start_time=00:00

sync_end_time=23:59

write_mark_file_freq=500

store_path_count=1

store_path0=/space/images

subdir_count_per_path=256

tracker_server=10.143.88.34:22122

log_level=info

run_by_group=

run_by_user=

allow_hosts=*

file_distribute_path_mode=0

file_distribute_rotate_count=100

fsync_after_written_bytes=0

sync_log_buff_interval=10

sync_binlog_buff_interval=10

sync_stat_file_interval=300

thread_stack_size=512KB

upload_priority=10

if_alias_prefix=

check_file_duplicate=0

file_signature_method=hash

key_namespace=FastDFS

keep_alive=0

use_access_log = false

rotate_access_log = false

access_log_rotate_time=00:00

rotate_error_log = false

error_log_rotate_time=00:00

rotate_access_log_size = 0

rotate_error_log_size = 0

file_sync_skip_invalid_record=false

use_connection_pool = true

connection_pool_max_idle_time = 3600

http.domain_name=

http.server_port=8888

##include mod_fastdfs.conf

5、启动fastdfs

创建存储目录和tracter日志目录

tracter服务器创建 mkdir /space/fastdfs

storage服务器创建   mkdir /space/images

启动tracter服务器   /usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf

启动storage服务器 /usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf

6、查看fastdfs存储节点状态

[[email protected] ~]# /usr/local/bin/fdfs_monitor /etc/fdfs/client.conf

[2016-08-02 15:54:52] DEBUG - base_path=/space/fastdfs, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0

server_count=1, server_index=0

tracker server is 10.143.88.34:22122

group count: 1

Group 1:

group name = group1

disk total space = 17646 MB

disk free space = 13112 MB

trunk free space = 0 MB

storage server count = 2

active server count = 2

storage server port = 23000

storage HTTP port = 8888

store path count = 1

subdir count per path = 256

current write server index = 1

current trunk file id = 0

Storage 1:

id = 10.143.88.32

ip_addr = 10.143.88.32  ACTIVE

http domain =

version = 5.02

join time = 2016-07-20 16:29:12

up time = 2016-07-27 16:37:39

total storage = 17646 MB

free storage = 13118 MB

upload priority = 10

store_path_count = 1

subdir_count_per_path = 256

storage_port = 23000

storage_http_port = 8888

current_write_path = 0

source storage id= 10.143.88.33

if_trunk_server= 0

total_upload_count = 79

success_upload_count = 79

total_append_count = 0

success_append_count = 0

total_modify_count = 0

success_modify_count = 0

total_truncate_count = 0

success_truncate_count = 0

total_set_meta_count = 79

success_set_meta_count = 79

total_delete_count = 0

success_delete_count = 0

total_download_count = 455

success_download_count = 455

total_get_meta_count = 0

success_get_meta_count = 0

total_create_link_count = 0

success_create_link_count = 0

total_delete_link_count = 0

success_delete_link_count = 0

total_upload_bytes = 8017208

success_upload_bytes = 8017208

total_append_bytes = 0

success_append_bytes = 0

total_modify_bytes = 0

success_modify_bytes = 0

stotal_download_bytes = 60558430

success_download_bytes = 60558430

total_sync_in_bytes = 7211305

success_sync_in_bytes = 984415

total_sync_out_bytes = 383459386800

success_sync_out_bytes = 673801

total_file_open_count = 623259

success_file_open_count = 623259

total_file_read_count = 543

success_file_read_count = 543

total_file_write_count = 1245502

success_file_write_count = 622813

last_heart_beat_time = 2016-08-02 15:54:28

last_source_update = 2016-08-01 10:20:06

last_sync_update = 2016-07-20 22:49:51

last_synced_timestamp = 2016-07-20 22:49:43 (8 days 17h:07m:04s delay)

Storage 2:

id = 10.143.88.33

ip_addr = 10.143.88.33  ACTIVE

http domain =

version = 5.02

join time = 2016-07-20 16:29:07

up time = 2016-07-27 15:48:04

total storage = 17646 MB

free storage = 13112 MB

upload priority = 10

store_path_count = 1

subdir_count_per_path = 256

storage_port = 23000

storage_http_port = 8888

current_write_path = 0

source storage id=

if_trunk_server= 0

total_upload_count = 78

success_upload_count = 78

total_append_count = 0

success_append_count = 0

total_modify_count = 0

success_modify_count = 0

total_truncate_count = 0

success_truncate_count = 0

total_set_meta_count = 78

success_set_meta_count = 78

total_delete_count = 0

success_delete_count = 0

total_download_count = 354

success_download_count = 354

total_get_meta_count = 0

success_get_meta_count = 0

total_create_link_count = 0

success_create_link_count = 0

total_delete_link_count = 0

success_delete_link_count = 0

total_upload_bytes = 7089594

success_upload_bytes = 7089594

total_append_bytes = 0

success_append_bytes = 0

total_modify_bytes = 0

success_modify_bytes = 0

stotal_download_bytes = 43460450

success_download_bytes = 43460450

total_sync_in_bytes = 10682511

success_sync_in_bytes = 673801

total_sync_out_bytes = 273763064483

success_sync_out_bytes = 984415

total_file_open_count = 1001331

success_file_open_count = 1001331

total_file_read_count = 413

success_file_read_count = 413

total_file_write_count = 2001854

success_file_write_count = 1000983

last_heart_beat_time = 2016-08-02 15:54:45

last_source_update = 2016-07-29 15:56:47

last_sync_update = 2016-07-20 22:21:39

last_synced_timestamp = 2016-07-20 22:21:35 (11 days 11h:58m:31s delay)

8、FastDFS-zyc来监控FastDFS的状态

时间: 2024-08-26 22:29:16

FastDFS安装部署的相关文章

FastDFS 安装部署

# #FastDFS Github地址:https://github.com/happyfish100/fastdfs #FastDFS 简介:http://www.oschina.net/p/fastdfs/ #分布式文件系统及FastDFS : https://chulung.com/article/22 #分布式架构高可用架构篇:http://www.cnblogs.com/hujihon/p/5709556.html #实验拓扑图(逻辑图) #软件下载 # #libfastcommon

FastDFS安装、配置、部署(一)

摘要: FastDFS是一个开源的,高性能的的分布式文件系统,他主要的功能包括:文件存储,同步和访问,设计基于高可用和负载均衡,FastDFS非常适用于基于文件服务的站点,例如图片分享和视频分享网站 声明:对于分布式的一些技术点在网上都可以查到,这边对于一些基本的操作做了些相关的总结,并作为分布式框架技术的支持文档,希望可以帮助到大家 FastDFS是一个开源的,高性能的的分布式文件系统,他主要的功能包括:文件存储,同步和访问,设计基于高可用和负载均衡,FastDFS非常适用于基于文件服务的站点

CentOS 下 FastDFS _ V4.06 安装部署

CentOS 下 FastDFS _ V4.06 安装部署 CentOS系统64位x86_64 GNU/Linux 软件准备 libevent-1.4.14b-stable.tar.gz FastDFS_v4.06.tar.gz nginx-1.3.9.tar.gz fastdfs-nginx-module_v1.15.tar.gz 安装libevent 下载并安装 #cd /usr/src wget https://github.com/downloads/libevent/libevent/

FastDFS安装、配置、API使用(一)-安装和部署

FastDFS是一个开源的,高性能的的分布式文件系统,他主要的功能包括:文件存储,同步和访问,设计基于高可用和负载均衡,FastDFS非常适用于基于文件服务的站点,例如图片分享和视频分享网站 FastDFS有两个角色:跟踪服务(tracker)和存储服务(storage),跟踪服务控制,调度文件以负载均衡的方式访问:存储服务包括:文件存储,文件同步,提供文件访问接口,同时以key value的方式管理文件的元数据 跟踪和存储服务可以由1台或者多台服务器组成,同时可以动态的添加,删除跟踪和存储服务

FastDFS安装、配置、部署(三)-storage配置详解

1.基本配置 # is this config file disabled # false for enabled # true for disabled disabled=false # the name of the group this storage server belongs to group_name=group1 # bind an address of this host # empty for bind all addresses of this host bind_addr

FastDFS安装、配置、部署(二)-Tracker配置详解

1.基本配置 # 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=10.16.123.132 # the tracker server pfort port=22122 # connect timeout in

FastDFS安装、配置、部署

摘要: FastDFS是一个开源的,高性能的的分布式文件系统,他主要的功能包括:文件存储,同步和访问,设计基于高可用和负载均衡,FastDFS非常适用于基于文件服务的站点,例如图片分享和视频分享网站 声明:对于分布式的一些技术点在网上都可以查到,这边对于一些基本的操作做了些相关的总结,并作为分布式框架技术的支持文档,希望可以帮助到大家 FastDFS是一个开源的,高性能的的分布式文件系统,他主要的功能包括:文件存储,同步和访问,设计基于高可用和负载均衡,FastDFS非常适用于基于文件服务的站点

中间件-FastDFS 02软件安装部署调试,及和Nginx的集成

一.软件安装准备 由于公司统一使用ubuntu 16.04,所以一下软件安装语法和环境都是以ubuntu 为准. 软件下载需要下载 fastdfs-master.zip libfastcommon-master.zip fastdfs-nginx-module-master.zip nginx-1.8.1.tar.gz openssl-1.1.0e.tar.gz pcre-8.00.tar.gz zlib-1.2.11.tar.gz 一.FastDFS安装 前置:需要提前安装所需依赖包 apt-

FastDFS安装与部署

(一)下载依赖库libevent(不管解压在哪里必须安装在/usr目录下,否则FastDFS找不到) wget https://github.com/downloads/libevent/libevent/libevent-1.4.14b-stable.tar.gz tar zvxf libevent-1.4.14b-stable.tar.gz ./configure --prefix=/usr make clean; make make install (二)下载FastDFS安装包及ngin