CentOS7 中 FastDFS 的安装

FastDFS 的安装

一.FastDFS的安装包

二.安装libfastcommon

1.解压libfastcommon

unzip libfastcommon-master.zip 

2.编译libfastcommon

cd至解压后的目录,执行:

./make.sh

3.安装libfastcommon

./make.sh install

三.安装FastDFS

1.解压FastDFS

tar -zxvf V5.11.tar.gz 

2.编译FastDFS

cd至解压后的目录,执行:

./make.sh

3.安装FastDFS

./make.sh install

四.配置FastDFS

1.配置tracker

cd 至 /ect/fdfs 目录下,将文件 tracker.conf.example 下载至本地,然后去掉 .example 后缀名,并做修改:

# the base path to store data and log files
base_path=/data/fastdfs/tracker
  • 此处 base_path 为 tracker 的日志文件所在位置,可自行设置并创建(必须存在)

2.配置storage

cd 至 /ect/fdfs 目录下,将文件 storage.conf.example 下载至本地,然后去掉 .example 后缀名,并做修改:

# the base path to store data and log files
base_path=/data/fastdfs/storage

# store_path#, based 0, if store_path0 not exists, it's value is base_path
# the paths must be exist
store_path0=/data/fastdfs/files
#store_path1=/home/yuqing/fastdfs2

# tracker_server can ocur more than once, and tracker_server format is
#  "host:port", host can be hostname or ip address
tracker_server=119.45.176.214:22122


  • storage 需要修改3个地方,且不在同一处
  • 此处 base_path 为 storage 的日志文件所在位置,可自行设置并创建(必须存在)
  • 此处 store_path0 为文件的存储位置,可自行设置并创建(必须存在)
  • 此处的 tracker_server 只需修改 ip 部分,即为 tracker 所在的 ip

五.启动FastDFS

启动 tracker

service fdfs_trackerd start

启动storage

service fdfs_storaged start

验证,查看 fdfs 进程,出现下图,表示安装成功

ps -ef | grep fdfs

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/m0_37633306/article/details/109562868