2024年6月5日发(作者:)
fastDFS 安装部署文档
fastDFS下载地址:/p/fastdfs/downloads/list
libevent官网: /
系统环境:
fastdfs_tracker centos6.5_64 ip:192.168.1.50
fastdfs_storage_s1 centos6.5_64 ip:192.168.1.51
fastdfs_storage_s2 centos6.5_64 ip:192.168.1.52
fastdfs_client centos6.5_64 ip:192.168.1.54
selinux关闭,iptables关闭。
配置tracker:
先装libevent,后fastdfs
[root@centos-6.5-x64 ~]#yum install -y gcc gcc-c++
1
[root@centos-6.5-x64 ~]#tar zxvf libevent-2.0.21-stable
2
[root@centos-6.5-x64 ~]#tar zxvf FastDFS_
3
[root@centos-6.5-x64 ~]#cd libevent-2.0.21-stable
4
[root@centos-6.5-x64 libevent-2.0.21-stable]#./configure && make &&
5
make install
6
[root@centos-6.5-x64 libevent-2.0.21-stable]# cd
7
[root@centos-6.5-x64 ~]#cd FastDFS
8
[root@centos-6.5-x64 FastDFS]#sh && sh install
fastdfs的配置文件路径默认在 /etc/fdfs/
[root@centos-6.5-x64 ~]#cd /etc/fdfs/
[root@centos-6.5-x64 fdfs]#ll
总用量 56
-rw-r–r– 1 root root 1463 4月 23 04:10
-rw-r–r– 1 root root 858 4月 23 04:10
-rw-r–r– 1 root root 31172 4月 23 04:10
-rw-r–r– 1 root root 7460 4月 23 04:10
-rw-r–r– 1 root root 6621 4月 23 04:10
客户端上传配置文件
文件存储服务器配置文件
负责均衡调度服务器配置文件
http服务器配置文件(可忽略不用)
跟fastdfs相关的命令都在 /usr/local/bin/ 下
编辑tracker配置文件:
[root@centos-6.5-x64 fdfs]#grep -v “#” | grep -v “^$”
# 配置文件是否生效,false是生效,true是屏蔽。
disabled=false
#程序的监听地址,如果不设定则监听所有地址
bind_addr=
#tracker监听的端口
port=22122
#连接超时时间
connect_timeout=30
#tracker在通过网络发送接收数据的超时时间
network_timeout=60
#数据和日志的存放地点
base_path=/home/yuqing/fastdfs
#最大连接数
max_connections=256
#工作线程数一般为cpu个数
work_threads=4
#在存储文件时选择group的策略,0:轮训策略 1:指定某一个组 2:负载均衡,选择空闲空间最大
的group.
store_lookup=2
#如果上面的store_lookup选择了1,则这里需要指定一个group
store_group=group2
#在group中的哪台storage做主storage,当一个文件上传到主storage后,就由这台机器同步文
件到group内的其他storage上,0:轮训策略 1:根据ip地址排序,第一个 2:根据优先级排序,
第一个
store_server=0
#选择文件上传到storage中的哪个(目录/挂载点),storage可以有多个存放文件的base path 0:轮训
策略 2:负载均衡,选择空闲空间最大的
store_path=0


发布评论