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

相关推荐
AI人工智能+电脑小能手1 小时前
【大白话说Java面试题 第87题】【Mysql篇】第17题:分布式事务的实现原理?
java·数据库·分布式·mysql·面试
不爱编程的小陈7 小时前
事务的进化:从MySQL单机事务到TiDB分布式事务的探究
分布式·mysql·tidb
Java 码思客14 小时前
【Redis分布式缓存实战】第4章 单机Redis部署、配置与基础优化
redis·分布式·缓存
卷毛迷你猪14 小时前
快速实验篇(A3)基于 Hive 的气象数据数仓构建与干旱指标初步分析
大数据·hadoop·分布式
卷毛迷你猪14 小时前
快速实验篇(A4)Hive 数据仓库进阶:全站点干旱事件识别与多维统计分析
数据仓库·hive·hadoop·分布式
RingWu16 小时前
高并发三板斧-异步
分布式·微服务·架构
搞科研的小刘选手1 天前
【中山大学主办】第六届计算机科学与区块链国际学术会议(CCSB 2026)
分布式·神经网络·计算机视觉·区块链·计算机科学·共识算法·自然语言
小饼干在学嘎瓦1 天前
本地缓存和分布式缓存如何选择?
分布式·缓存
XLYcmy1 天前
全链路验证测试系统:一个针对智能代理(Agent)系统全链路能力的自动化验证脚本
分布式·python·http·网络安全·ai·llm·agent
phltxy2 天前
HAProxy安装与RabbitMQ负载均衡配置
分布式·rabbitmq·负载均衡