到底如何单节点安装和配置FastDFS?

1.安装gcc

yum -y install gcc

2.安装libevent

yum -y install libevent

3.安装libfastcommon-master

unzip libfastcommon-master.zip
cd libfastcommon-master
编译并且安装:
./make.sh 
./make.sh install

4.安装fastdfs

tar -zxvf FastDFS_v5.08.tar.gz
cd FastDFS
./make.sh 
./make.sh install

5.配置

查看脚本文件

ll /etc/init.d/ | grep fdfs
  • fdfs_trackerd 是tracker启动脚本

  • fdfs_storaged 是storage启动脚本

查看配置模板

ll /etc/fdfs/
  • tarcker.conf.sample 是tracker的配置文件模板

  • storage.conf.sample 是storage的配置文件模板

  • client.conf.sample 是客户端的配置文件模板

5.1.配置并启动tracker服务

cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
vim /etc/fdfs/tracker.conf 
base_path=/yourpath/tracker 

新建目录,根据上述路径

mkdir -p /yourpath/tracker

关闭防火墙

chkconfig iptables off

启动FastDFS Tracker Server服务

service fdfs_trackerd start
chkconfig fdfs_trackerd on

5.2.配置并启动storage服务

cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
vim /etc/fdfs/storage.conf
base_path=/yourpath/storage                 # 数据和日志文件存储根目录 
store_path0=/yourpath/storage               # 第一个存储目录 
tracker_server=xxx.xxx.xxx.xxx:22122        #  tracker服务器IP和端口 

创建目录,根据上述路径

mkdir -p /yourpath/storage

启动服务

service fdfs_storaged start
chkconfig fdfs_storaged on

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值