centos7 安装FastDFSV5.11

1. 安装libfastcommon

  1、获取libfastcommon安装包
wget https://github.com/happyfish100/libfastcommon/archive/V1.0.38.tar.gz

2、解压安装包

tar -zxvf V1.0.38.tar.gz

3、进入目录:libfastcommon-1.0.38

cd libfastcommon-1.0.38

4、执行编译和安装

./make.sh 
./make.sh  install

如果报错 -bash: make: command not found -bash: gcc: command not found 执行如下命令进行

yum -y install gcc make

2.安装FastDFS

1、获取fdfs安装包

wget https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz

2、解压安装包

tar -zxvf V5.11.tar.gz

3、进入目录

cd fastdfs-5.11

4、执行编译

./make.sh 
./make.sh install

3.配置Tracker服务

1、 修改tracker配置文件

cd /etc/fdfs
cp tracker.conf.sample tracker.conf
vi tracker.conf

-修改如下:

base_path=/home/mm/fastdfs/tracker #tracker存储data和log的跟路径,必须提前创建好
2、启动

/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start

3、查看启动启动情况

netstat -apn|grep fdfs

4.配置Storage服务

1、修改配置文件

cp storage.conf.sample storage.conf
vi storage.conf

2、修改如下

base_path=/home/mm/fastdfs/storage   #storage存储data和log的跟路径,必须提前创建好
store_path0=/home/mm/fastdfs/storage  #如果为空,则使用base_path
tracker_server=10.122.149.211:22122 #配置该storage监听的tracker的ip和port

3、启动

/usr/bin/fdfs_storaged /etc/fdfs/storage.conf start

4、查看启动启动情况

netstat -apn|grep fdfs

5.FastDFS命令测试

1、修改配置

cd /etc/fdfs
cp client.conf.sample client.conf

2、修改client.conf相关配置:

vi client.conf
base_path=/home/mm/fastdfs/tracker //tracker服务器文件路径
tracker_server=10.122.149.211:22122 //tracker服务器IP地址和端口号
http.tracker_server_port=80 # tracker服务器的http端口号,必须和tracker的设置对应起来

3、测试命令
/usr/bin/fdfs_upload_file <config_file> <local_filename>

在本地创建一个1.txt然后执行命令

/usr/bin/fdfs_upload_file  /etc/fdfs/client.conf 1.txt
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不出家的和尚

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值