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

相关推荐
kyle~19 小时前
DDS分布式实时系统---自省机制
开发语言·分布式·机器人·c#·接口·ros2
q210306337219 小时前
kafka启动几秒后挂了,重启多次无果
分布式·kafka
凯源智能20 小时前
工商业分布式光伏箱变智能监控落地实战
分布式·箱变测控·光伏箱变测控装置·箱变监控系统·箱式变测控装置
沂水弦音20 小时前
软控 EI 系列模块优势与竞品对比分析:面向 EtherCAT 分布式 I/O 的工程选型视角
分布式·制造·工业自动化·ethercat·io模块
木心术121 小时前
在NVIDIA DGX Spark上部署NemoClaw的实际操作方案以及实际应用便利性。
大数据·分布式·spark
kuokay21 小时前
MLOps 与 AIOps 的核心概
人工智能·分布式·大模型·agent·llama
openFuyao1 天前
openFuyao InferNex:云原生分布式 LLM 推理加速套件——从生产痛点到算力的极致释放
分布式·云原生·ai原生·openfuyao·多样化算力
咖啡星人k2 天前
MonkeyCode 开源协作指南:如何让分布式团队高效使用AI编程
分布式·开源·ai编程·monkeycode
阿坤带你走近大数据2 天前
如何保证kafka中的数据一致性
分布式·kafka
凯源智能2 天前
高寒地区分布式光伏箱变测控系统落地实战
分布式·箱变测控·光伏箱变测控装置·箱变监控系统