当前位置:网站首页>fastDFS入门
fastDFS入门
2022-07-01 18:48:00 【傻瓜搬砖人】
分布式文件系统
文件系统的全部,分散存储在多台主机上,形成一个完整的文件系统。
分布式文件系统基本结构
管理机 可以存储数据 也可以不存储数据
fastDFS 概述
c语言编写的一款开源分布式文件系统
fastDFS特点
1.应用层级的文件系统
2.不能挂载,就是 不能 mount 操作
fastDFS三个角色以及它们之间的关系
角色:
1. 追踪器 - tracker
2. 存储节点 - storage
3. 客户端 - client
关系:
1. client 和 storage 主动连接Tracker
2. storage 主动向 tracker 报告 状态信息
磁盘剩余情况、文件同步状况、文件上传下载次数
3.Storage 会启动 一个单独线程 对 Tracker 的连接和定时报告
3. 一个组包含的storage 不是通过配置文件设定,通过tracker 获取的
fastDFS扩容
1.横向扩容
增加容量
增加group组
2. 纵向扩容
数据备份
当前租的最大容量(存储节点中容量最小的那个)
所有存储节点组名必须相同
fastDFS 安装
- 安装
# 基础库包
# libfastcommon-1.36.zip
./make.sh
sudo ./make.sh install
# fastDFS
# fastdfs-5.10.tar.gz
./make.sh
sudo ./make.sh install
- 测试是否安装成功
fdfs_test
fastDF配置
# 1. 默认配置文件位置
# /etc/fdfs
#2. Tracker(追踪器)
# 修改配置文件
bind_addr=192.168.82.253 #当前主机ip
port=22122 # 绑定的端口
base_path=/home/root/fastDFS/tracker # log目录
# 启动Tracker 服务
fdfs_trackerd /etc/fdfs/tracker.conf
sudo fdfs_trackerd /etc/fdfs/tracker.conf restart
sudo fdfs_trackerd /etc/fdfs/tracker.conf stop
#3.stroage(存储节点)
# 修改配置文件
group_name=group1 # 存储节点所属的组
bind_addr=192.168.82.253 # 存储节点绑定的ip
port=23000 # 绑定的端口
base_path=/home/root/fastDFS/storage # 存储目录的个数
store_path0=/home/root/fastDFS/storage # 配置具体的存储目录
tracker_server=192.168.82.252:22122 # 连接tracker 的时候使用的ip和端口
# 启动storage 服务
fdfs_storaged /etc/fdfs/storage.conf
sudo fdfs_storaged /ect/fdfs/storage.conf restart
sudo fdfs_storaged /etc/fdfs/storage.conf stop
#4. Client
base_path=/home/root/fastDFS/client # log 日志目录
tracker_server=192.168.82.253:22122 # 连接tracker 时候需要ip和端口信
# 检测当前fdfs 环境是否通
fdfs_monitor /etc/fdfs/client.conf # 出现 active 表示正常
边栏推荐
- 较真儿学源码系列-InheritableThreadLocal(逐行源码带你分析作者思路)
- Gaussdb (for MySQL):partial result cache, which accelerates the operator by caching intermediate results
- Oracle physical architecture
- switch 有四样写法你知道么
- Analysis of GetMessage underlying mechanism
- 安装sharp报错
- Wechat applet navigator has a shadow after clicking. Remove the shadow effect of navigator
- list大集合等比分割成多个小list集合
- STC 32位8051单片机开发实例教程 三 程序编译设置与下载
- 开发那些事儿:EasyCVR平台添加播放地址鉴权功能
猜你喜欢
Win11快捷键切换输入法无反应怎么办?快捷键切换输入法没有反应
GaussDB(for MySQL) :Partial Result Cache,通过缓存中间结果对算子进行加速
Servlet knowledge points
How to correctly use vertx to operate redis (3.9.4 with source code analysis)
GC垃圾回收
Oracle physical architecture
墨天轮沙龙 | 清华乔嘉林:Apache IoTDB,源于清华,建设开源生态之路
Wireshark packet analysis TCP, FTP
windows环境 redis安装和启动(后台启动)
Interview question 1
随机推荐
Cookie和Session的相关概念
PowerDesigner design name and comment replacement
Procédure de mesure du capteur d'accord vibrant par le module d'acquisition d'accord vibrant
EasyCVR集群视频广场页面切换时,请求流未能终止的问题优化
Oracle physical architecture
一个程序员如何快速成长
Use of common built-in classes of JS
Basic use of MySQL
Wechat applet navigator has a shadow after clicking. Remove the shadow effect of navigator
SQL getting started plan-1-select
A quietly rising domestic software, low-key and powerful!
MYSLQ十种锁,一篇文章带你全解析
P2433 [deep foundation 1-2] primary school mathematics n in one
Uni app wechat applet one click login to obtain permission function
Hls4ml/vivado HLS error reporting solution
list大集合等比分割成多个小list集合
The key to the success of digital transformation enterprises is to create value with data
DS Transunet:用于医学图像分割的双Swin-Transformer U-Net
Interview questions shared in today's group
torch. nn. functional. Interpolate function