您的位置:首页 > 运维架构 > 网站架构

LVS-HA 高可用集群配置

2013-07-23 16:33 302 查看
IP 规划(使用 XEN 虚拟机,virbr0)
=================================
Client: 192.168.122.1/24 (真实机做客户端)
Director1:
DIP eth0 192.168.122.100/24
Director2:
DIP eth0 192.168.122.200/24
Real Server A :
eth0 192.168.122.11/24
Real Server B :
eth0 192.168.122.12/24
分别在 Director1、Director2 上部署浮动资源(VIP IPVS 策略),测试 2 个 Director 在 DR 模式下都工作正常。测试完成后都撤掉浮动资源。
Director1
======================
[root@localhost ~]# yum install piranha
Director2 同时安装
[root@localhost ~]# piranha-passwd
New Password:123
Verify: 123
Adding password for user piranha
[root@localhost ~]# service piranha-gui start
[root@localhost ~]# netstat -tunpl | grep 3636
[root@localhost ~]# firefox http://192.168.122.100:3636


















复制一份配置文件到备份服务器

[root@localhost ~]# scp /etc/sysconfig/ha/lvs.cf 192.168.122.200:/etc/sysconfig/ha/
先在主 LVS 上
[root@localhost ~]# service pulse start
检查一下,然后后备 LVS 上
[root@localhost ~]# service pulse start

在客户端 elinks --dump http://192.168.122.254 测试
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息