centos安装FastDFS

1.上传文件

链接:https://pan.baidu.com/s/13iV9_eJmqlEaVYT8Jk8lNg&shfl=sharepset
提取码:ng9o

2.安装依赖等

(1)GCC依赖
yum -y install gcc
(2)unzip工具
yum install -y unzip zip
(3)安装libevent
yum -y install libevent
(4)Nginx所需依赖
yum -y install pcre pcre-devel zlib zlib-devel openssl openssl-devel

3安装libfastcommon-master

通过编译安装

(1)解压
unzip libfastcommon-master.zip 
(2)进入、编译、安装
 cd libfastcommon-master
./make.sh 
./make.sh install

4.安装FastDFS

编译安装

(1)解压
tar -zxvf FastDFS_v5.08.tar.gz
(2)进入、编译、安装
cd FastDFS
./make.sh 
./make.sh install

校验安装结果1

输入命令
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.启动tracker

(0)进入/etc/fdfs中复制文件并编辑
 cp tracker.conf.sample tracker.conf
 vi tracker.conf
(1) 修改配置文件模板
base_path=/root/fdfs/tracker   #tracker的数据和日志存放目录(根据自己的需求设置)
(2)创建刚配置的文件夹
mkdir -p /root/fdfs/tracker
(3)普通方式启动
sh /etc/init.d/fdfs_trackerd   #start 启动  等
(4)或者以系统服务的方式启动
service fdfs_trackerd start  # 启动fdfs_trackerd服务,停止用stop
(5)设置tracker开机启动
chkconfig fdfs_trackerd on

tracker启动成功
在这里插入图片描述

6.启动storage

(0)进入/etc/fdfs中复制文件并编辑
 cp tracker.conf.sample tracker.conf
 vi tracker.conf
(1)进入/etc/fdfs中 修改配置文件模板
base_path=/root/fdfs/storage # storage的数据和日志存放目录
store_path0=/root/fdfs/storage # storage的上传文件存放路径
tracker_server=47.106.139.201:22122 # tracker的地址
(根据自己的需求设置)
(2)创建刚配置的文件夹
mkdir -p /root/fdfs/storage 
(3)普通方式启动
sh /etc/init.d/fdfs_storaged   #start 启动  等
(4)或者以系统服务的方式启动
service fdfs_storaged start  # 启动fdfs_storaged服务,停止用stop
(5)设置tracker开机启动
chkconfig fdfs_storaged on

storage 启动成功
在这里插入图片描述

7.查看进程

ps -ef | grep fdfs
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值