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

相关推荐
网络工程小王6 小时前
【HCIE-AI】12.deepspeed分布式并行训练进阶版
人工智能·pytorch·分布式·学习·昇腾·deepspeed
ACP广源盛139246256738 小时前
国产算力互联IX8024@ACP#Kimi K3 开源后的端侧部署硬件架构分析
大数据·人工智能·分布式·单片机·嵌入式硬件
花生了什么事o9 小时前
分布式 ID 生成方案:从数据库自增到雪花算法
数据库·分布式·算法
爱吃提升1 天前
python 分布式爬虫、爬虫合规与综合实战项目
分布式·爬虫·python
ZENERGY-众壹1 天前
跨品牌逆变器升级:华为锦浪德业 API 对接的 7 个坑
分布式·华为·数据归一化·光伏运维·逆变器api
薛定谔的猫19821 天前
LLaMA-Factory +DeepSpeed 分布式多卡训练实战全解
分布式·deepspeed·zero·多卡训练·多卡分布式训练
稚南城才子,乌衣巷风流1 天前
RabbitMQ 消息队列:从入门到实战
分布式·rabbitmq
Database_Cool_2 天前
单机 MySQL 迁移到分布式数据库方便吗?阿里云 PolarDB-X 100% MySQL 协议兼容零改造平滑迁移
数据库·分布式·mysql
肥胖小羊2 天前
解决企业微信 AccessToken 刷新并发冲突的分布式锁机制实践
分布式·企业微信
风中凌乱3 天前
kafka新版本集群的安装与部署
分布式·kafka