linux 环境下 分布式文件搭建fastDFS

1.软件信息

地址:happyfish100 (YuQing) · GitHub

1.fastdfs-master.zip

2.fastdfs-nginx-module-master.zip

3.libfastcommon-master.zip

4.libserverframe-master.zip

yum install make cmake gcc gcc-c++ perl

2.安装libfastcommon

unzip libfastcommon-master.zip

root@xhzdh libserverframe-master# ./make.sh

root@xhzdh libserverframe-master# ./make.sh install

3.安装libserverframe 网络环境

root@xhzdh soft# unzip libserverframe-master.zip

root@xhzdh libserverframe-master# ./make.sh

root@xhzdh libserverframe-master# ./make.sh install

不安装 在安装 fastdfs-master 可能出现这样的错误gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I../common -I/usr/local/include

In file included from ../common/fdfs_global.c:21:

../common/fdfs_global.h:17:10: 致命错误:sf/sf_global.h:没有那个文件或目录

#include "sf/sf_global.h"

^~~~~~~~~~~~~~~~

编译中断。

make: *** Makefile:28:../common/fdfs_global.o 错误 1

gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon

In file included from ../common/fdfs_global.c:21:

../common/fdfs_global.h:17:10: 致命错误:sf/sf_global.h:没有那个文件或目录

#include "sf/sf_global.h"

4.安装fastdfs-master.zip

root@xhzdh soft# unzip fastdfs-master.zip

root@xhzdh soft# cd fastdfs-master/
root@xhzdh fastdfs-master# ./make.sh

root@xhzdh fastdfs-master# ./make.sh install

2.配置tracker服务

root@xhzdh soft# cd fastdfs
root@xhzdh fastdfs# ls
root@xhzdh fastdfs# mkdir tracker
root@xhzdh fastdfs# mkdir -p /home/soft/fastdfs/storage/logs
root@xhzdh fastdfs# mkdir -p /home/soft/fastdfs/storage/file

(1)修改配置文件

cd /etc/fdfs/

vi tracker.conf

base_path = /home/soft/fastdfs/tracker

(2)启动服务

fdfs_trackerd /etc/fdfs/tracker.conf

重启服务 fdfs_trackerd /etc/fdfs/tracker.conf restart

(3)检查服务

ps aux | grep tracker

netstat -anp | grep 22122

3.配置storage服务

(1)修改配置文件

cd /etc/fdfs/

vi storage.conf

base_path = /home/soft/fastdfs/storage/logs

#这里还需要修改group_name,访问图片时,需要将当前的group_name作为前缀加到地址中。

#group_name = qdsw

store_path0 = /home/soft/fastdfs/storage/file

tracker服务的地址

tracker_server = 192.168.*.*:22122

(2)启动服务

fdfs_storaged /etc/fdfs/storage.conf

(3)检查服务

ps aux | grep storage

root@xhzdh fdfs# netstat -anp | grep 23000

相关推荐
8Qi811 小时前
DDD架构演进
java·分布式·mvc·ddd
方方洛11 小时前
ray教程-23-附录C-术语表
人工智能·分布式·机器学习
海棠Flower未眠19 小时前
下单请求处理流程:商品维度分布式锁与 Redis 预扣库存
redis·分布式·junit
罗四强20 小时前
第10篇:打包上架:签名、打包 HAP、发布到华为应用市场
分布式·操作系统·harmonyos·arkts·鸿蒙系统
秋饼21 小时前
Redis 全面解析:从数据结构到主从/哨兵/集群、分布式锁与面试高频考点,代码到原理一次讲透
数据库·redis·分布式·面试·后端开发
二月夜21 小时前
Redis 高频面试题全解:缓存三大问题、大 key 治理与分布式锁之争(2026 招聘 JD 真题复盘)
redis·分布式·后端·缓存
樱花落木兰21 小时前
Redis 消息队列的可靠性演进:从 List、Pub/Sub 到 Stream 消费者组,以及 8.x 版本改变了什么
java·开发语言·经验分享·redis·分布式·python·软件工程
真上帝的左手1 天前
12. 消息队列-Kafka进阶
分布式·中间件·kafka
Thanks_ks2 天前
Cookie 和 Session 到底是什么关系——登录态是怎么维持的
分布式·http·jwt·cookie·session·后端开发·登录态
Sayai2 天前
Kafka 跨数据中心日志同步实战:MirrorMaker 2 选型对比 + Flink 中继任务落地(双中心互备与消费者组隔离避坑)
大数据·运维·分布式·flink·kafka·消息队列·高可用