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

相关推荐
萧瑟余晖7 小时前
Java深入解析篇三十六之分布式系统详解
java·开发语言·分布式
cc复CC11 小时前
从零开始手写 Spark 03|RDD 的惰性流水线
分布式
cc复CC11 小时前
从零开始手写 Spark 02|数据流与延迟迭代
大数据·分布式
七夜zippoe12 小时前
基于 DolphinDB 构建分布式集群:从节点配置到高可用部署的完整实践
分布式·集群·dolphindb·节点配置·高可用部署
Acrellea13 小时前
并网验收难破局:分布式光伏如何攻克孤岛、逆流两大技术关卡
分布式
杨运交1 天前
[060][调度模块]Redisson vs Redis 原生锁:两种分布式锁实现深度对比
数据库·redis·分布式
heimeiyingwang1 天前
【架构实战】分布式事务:从CAP定理到Seata实战,一文讲透跨服务数据一致性
分布式·架构
lakernote1 天前
图解 Kafka Consumer 常用 API:poll、seek、pause、wakeup 到底在控制什么?
分布式·kafka·linq
数据库小学妹1 天前
集群与分布式啥区别?从主从集群到分布式实战
分布式·分布式数据库·数据库架构·集群·分库分表·主从集群·集群与分布式
江畔柳前堤1 天前
AgentScope 设计与原理全解:从消息原语到分布式智能体工程底座
大数据·人工智能·分布式·目标检测·机器学习·语言模型·架构