赞
踩
在下图中,任何一个节点都支持水平横向无限扩展。当在某一个Group中添加新的Storage服务器的时候,新加入该Group的服务器会自动同步所有数据。当新添加Group的时候,只需要修改处于前端的Nginx服务器即可。要实现主备自动切换还可以加入KeepAlived中间件。
FastDFS分布式文件集群HA架构图
集群中具体机器配置
安装软件 | 机器主机名 | 应用IP地址 | 管理IP地址 |
---|---|---|---|
fastdfs+fastdfs-nginx-module | fastdfs-storage1-group1 | 192.168.80.11 | 192.168.10.11 |
fastdfs+fastdfs-nginx-module | fastdfs-storage2-group1 | 192.168.80.12 | 192.168.10.12 |
fastdfs+fastdfs-nginx-module | fastdfs-storage3-group1 | 192.168.80.13 | 192.168.10.13 |
fastdfs+fastdfs-nginx-module | fastdfs-storage4-group2 | 192.168.80.14 | 192.168.10.14 |
fastdfs+fastdfs-nginx-module | fastdfs-storage5-group2 | 192.168.80.15 | 192.168.10.15 |
fastdfs+fastdfs-nginx-module | fastdfs-storage6-group2 | 192.168.80.16 | 192.168.10.16 |
fastdfs+fastdfs-nginx-module | fastdfs-storage7-group3 | 192.168.80.17 | 192.168.10.17 |
fastdfs+fastdfs-nginx-module | fastdfs-storage8-group3 | 192.168.80.18 | 192.168.10.18 |
fastdfs+fastdfs-nginx-module | fastdfs-storage9-group3 | 192.168.80.19 | 192.168.10.19 |
fastdfs+fastdfs-nginx-module | fastdfs-storage10-group1-new | 192.168.80.20 | 192.168.10.20 |
fastdfs | fastdfs-tracker1 | 192.168.80.21 | 192.168.10.21 |
fastdfs | fastdfs-tracker2 | 192.168.80.22 | 192.168.10.22 |
fastdfs | fastdfs-tracker3 | 192.168.80.23 | 192.168.10.23 |
nginx | fastdfs-nginx0 | 192.168.80.50 | 192.168.10.50 |
nginx | fastdfs-nginx1 | 192.168.80.51 | 192.168.10.51 |
- yum update
- mkdir /source
- cd /source
- yum install -y gcc gcc-c++ make cmake wget libevent
- wget https://github.com/happyfish100/libfastcommon/archive/V1.0.35.tar.gz
- wget https://github.com/happyfish100/fastdfs/archive/V5.10.tar.gz
- tar -zxvf V1.0.35.tar.gz
- tar -zxvf V5.10.tar.gz
- cd libfastcommon-1.0.35
- ./make.sh
- ./make.sh install
- ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so
- cd ../
- cd fastdfs-5.10/
- ./make.sh
- ./make.sh install
- cd ../
- cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
- cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
- cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf
- mkdir -p /data/fdfs/tracker
- mkdir -p /data/fdfs/storage
- mkdir -p /data/fdfs/client
- mkdir -p /data/fdfs/disks/volume0
- mkdir -p /data/fdfs/disks/volume1
- mkdir -p /data/fdfs/disks/volume2
- mkdir -p /data/fdfs/disks/volume3
- mkdir -p /data/fdfs/disks/volume4
- mkdir -p /data/fdfs/disks/volume5
部署步骤
- # 添加用户
- useradd nginx -s /sbin/nologin -M
-
- # 安装Nginx需要的pcre(Perl兼容正则表达式)库,允许Nginx使用rewrite模块提供URL重写功能。
- yum install pcre pcre-devel perl-ExtUtils-Embed -y
-
- # 安装openssl-devel,允许Nginx提供HTTPS服务。
- yum install openssl-devel -y
-
- # 下载软件包
- cd /source
- wget http://nginx.org/download/nginx-
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。