环境:CentOS 7.4.1708
FastDFS版本: 6.04
yum -y install gcc gcc+ gcc-c++ openssl openssl-devel pcre pcre-devel
tar zxvf libfastcommon-1.0.42.tar.gz
cd libfastcommon-1.0.42
./make.sh
./make.sh install
tar zxvf fastdfs-6.04.tar.gz
cd fastdfs-6.04
./make.sh
./make.sh install
进入fastdfs配置文件夹 cd /etc/fdfs
cp tracker.conf.sample tracker.conf
vim tracker.conf
#tracker数据文件和日志存储路径,若不存在请自行创建
base_path=/data/fastdfs/tracker
#tracker服务端口,默认22122
port=22122
# HTTP 服务端口
http.server_port=8080
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
cp storage.conf.sample storage.conf
vim storage.conf
#storage所在组名称
group_name=group1
#storage数据文件和日志目录,若不存在请自行创建
base_path=/data/fastdfs/storage
#storage服务的存储路径个数,需要和store_path个数匹配
store_path_count=1
#storage服务的实际文件存储路径
store_path0=/data/fastdfs/storage_data
#tracker服务的ip和端口,不要使用127.0.0.1
tracker_server=192.168.1.168:22122
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf start
/usr/bin/fdfs_monitor /etc/fdfs/storage.conf
cp client.conf.sample client.conf
vim client.conf
#tracker服务中配置的路径
base_path=/data/fastdfs/tracker
#tracker服务的ip 端口
tracker_server=192.168.1.168:22122
#storage服务的实际文件存储路径
store_path0=/data/fastdfs/storage_data