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

相关推荐

  1. Linux环境Hadoop及完全分布式集群

    2024-05-12 06:22:04       18 阅读
  2. 分布式基础环境

    2024-05-12 06:22:04       16 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-05-12 06:22:04       17 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-05-12 06:22:04       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-05-12 06:22:04       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-05-12 06:22:04       18 阅读

热门阅读

  1. 自动驾驶技术:现状、挑战与前景

    2024-05-12 06:22:04       8 阅读
  2. Debian常用命令

    2024-05-12 06:22:04       10 阅读
  3. Linux下非常实用的asla卡录音小程序

    2024-05-12 06:22:04       8 阅读
  4. 大数据数据采集 Apache-Flume 笔记

    2024-05-12 06:22:04       6 阅读
  5. HTML/CSS3

    HTML/CSS3

    2024-05-12 06:22:04      8 阅读
  6. Spark读取Hive数据或文件如何提升速度的优化思路

    2024-05-12 06:22:04       8 阅读
  7. ConcurrentHashMap并发安全的实现

    2024-05-12 06:22:04       12 阅读
  8. SSH(安全外壳协议)简介

    2024-05-12 06:22:04       10 阅读
  9. 盛邦安全拟战略收购卫星通信加密厂商天御云安

    2024-05-12 06:22:04       9 阅读
  10. 使用python将多张图片转为一个PDF

    2024-05-12 06:22:04       11 阅读
  11. centos追加扩容整块磁盘容量

    2024-05-12 06:22:04       7 阅读
  12. CentOS Linux 7 一键安装和卸载docker & docker-compose

    2024-05-12 06:22:04       8 阅读