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

相关推荐
布谷歌29 分钟前
Oops! 更改field的数据类型,影响到rabbitmq消费了...(有关于Java序列化)
java·开发语言·分布式·rabbitmq·java-rabbitmq
一个假的前端男33 分钟前
RabbitMQ 消息队列 优化发送邮件
分布式·rabbitmq·ruby
A尘埃34 分钟前
关闭超时订单和七天自动确认收货+RabbitMQ规范
分布式·rabbitmq
2501_9032386538 分钟前
深入理解 Kafka 主题分区机制
分布式·kafka·个人开发
m0_7482412338 分钟前
RabbitMq 基础
分布式·rabbitmq·ruby
黄名富2 小时前
Spring Cloud — Hystrix 服务隔离、请求缓存及合并
java·分布式·spring·spring cloud·hystrix·微服务
ezreal_pan4 小时前
kafka消费能力压测:使用官方工具
分布式·kafka
宽带你的世界4 小时前
TiDB 是一个分布式 NewSQL 数据库
数据库·分布式·tidb
xiao-xiang4 小时前
kafka-集群缩容
分布式·kafka
比花花解语4 小时前
Kafka在Windows系统使用delete命令删除Topic时出现的问题
windows·分布式·kafka