运维小弟 运维小弟
首页
  • Ansible
  • Jenkins
  • Argocd
  • mysql
  • redis
  • docker
  • kubernetes
  • zabbix
  • prometheus
  • 工作笔记
  • nginx
  • terraform
关于
首页
  • Ansible
  • Jenkins
  • Argocd
  • mysql
  • redis
  • docker
  • kubernetes
  • zabbix
  • prometheus
  • 工作笔记
  • nginx
  • terraform
关于
  • openeuler22.03 LTS 源码编译安装fastdfs-6.06
    • 1、环境
    • 2、准备安装包
    • 3、安装源码编译相关依赖包:
    • 4、安装libfastcommon :
    • 5、安装fastdfs
    • 6、配置并启动tracker
    • 7、配置并启动storage
    • 8、配置client.conf 配置文件
      • 9、需注意!Fastdfs预留空间问题!
  • 03 LTS 源码编译安装nginx1.22.1
  • 03 LTS-SP1 开启SSH的X11 Forwarding,并使用Edge浏览器
  • openEuler普通用户su root时Permission denied
  • openeuler22.03 LTS 二进制部署MySQL 5.7
  • Openeuler22.03 部署 Postgresql10.5+PostGIS3.1
  • 在openeuler-22.03 LTS-SP1 上使用kubeadm极速部署Kubernetes 1.24版本集群
  • 《Openeuler》笔记
2023-08-06
目录

openeuler22.03 LTS 源码编译安装fastdfs-6.06

# openeuler22.03 LTS 源码编译安装fastdfs-6.06

# 1、环境

名称 版本 备注
openeuler 22.03 LTS
fastdfs 6.06
libfastcommon 1.0.43 libfastcommon是一个开源的C语言库,用于实现高性能的分布式文件系统和分布式存储系统

# 2、准备安装包

fastdfs 官网: https://github.com/happyfish100/fastdfs/tree/V6.06

官网可参考的安装手册:https://github.com/happyfish100/fastdfs/blob/V6.06/INSTALL

#fastdfs下载地址
https://github.com/happyfish100/fastdfs/archive/refs/tags/V6.06.zip

# libfastcommon下载地址
https://github.com/happyfish100/libfastcommon/archive/refs/tags/V1.0.43.zip
1
2
3
4
5

# 3、安装源码编译相关依赖包:

[root@0003 ~]# yum -y install make gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel kernel-headers
1

# 4、安装libfastcommon :

#解压 
unzip  V1.0.43.zip
#并进入目录,执行 ./make.sh,执行./make.sh install
1
2
3

# 5、安装fastdfs

#解压 
unzip V6.06.zip
#并进入目录,执行./make.sh,执行./make.sh install

#安装成功后,根据模板创建3个配置文件
[root@0003 ~]#cd /etc/fdfs/

[root@0003 ~]# cp client.conf.sample client.conf  && cp storage.conf.sample storage.conf  &&  cp tracker.conf.sample tracker.conf   


#创建fastdfs数据目录
[root@0003 ~]# mkdir -p /home/application/fastdfs/
1
2
3
4
5
6
7
8
9
10
11
12

# 6、配置并启动tracker

[root@0003 ~]# vim /etc/fdfs/tracker.conf

..............
disabled=false                              #配置文件是否失效
port=22122                                     #默认端口号
base_path= /home/application/fastdfs/          #日志及运行数据存储目录
..............
1
2
3
4
5

添加自启动,并启动服务

[root@fastdfs 00]# chkconfig --add fdfs_trackerd

[root@0003 ~]# /etc/init.d/fdfs_trackerd start
1
2
3

# 7、配置并启动storage

[root@0003 ~]# vim /etc/fdfs/storage.conf

..............
disabled=false                                  #配置文件是否失效
group_name=group1                               #组名,根据实际情况修改
port=23000                                      #设置storage的端口号,默认是23000
base_path = /home/application/fastdfs/          #设置storage数据文件和日志目录
store_path_count=1                              #存储路径个数,需要和store_path个数匹配
store_path0 = /home/application/fastdfs/        #实际文件存储路径
tracker_server = 10.131.225.40:22122            #如果有多个tracker, tracker_server可以写多行
..............
1
2
3
4
5
6
7
8
9

添加自启动,并启动服务

[root@fastdfs 00]# chkconfig --add fdfs_storaged

[root@0003 ~]# /etc/init.d/fdfs_storaged start
1
2
3

# 8、配置client.conf 配置文件

[root@0003 ~]#vim /etc/fdfs/client.conf

  • 只保留如下内容,默认的文件内容都可以清空
base_path=/tmp
tracker_server=10.131.225.40:22122
1
2

创建一个测试文件并上传

[root@0003 ~]# echo "hello openeuler" > /tmp/test

#指定client.conf配置文件,并指定需要上传的文件
[root@0003 ~]# fdfs_upload_file  /etc/fdfs/client.conf   /tmp/test
返回值如 group1/M00/00/00/wKgBY2SaRKOABUlXAAAAEAGd5Pk2122913, 在 storage server1上相应目录中均能查看到该文件


具体的文件应该在: /home/application/fastdfs/data/00/00/wKgBY2SaRKOABUlXAAAAEAGd5Pk2122913
1
2
3
4
5
6
7
8

# 9、需注意!Fastdfs预留空间问题!

注意FastDFS中有预留空间的概念,在tracker.conf中设置,配置项为:reserved_storage_space,为磁盘总空间的20%,请酌情设置reserved_storage_space这个参数,配合监控系统来监控文件系统大小

上次更新: 2023/09/06, 17:59:31
03 LTS 源码编译安装nginx1.22.1

03 LTS 源码编译安装nginx1.22.1→

最近更新
01
Nginx 管理维护规范
09-06
02
Centos7 使用nvm配置 多Node.js环境
08-06
03
Maven指定jdk版本打包
08-06
更多文章>
Theme by Vdoing | Copyright © 2019-2023 运维小弟 | fxkjnj.com 版权所有 ( 苏ICP备17042985号-3 )
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式