Heartbeat 项目是 Linux-HA 工程的一个组成部分,它实现了一个高可用集群系统。
拓扑
++++++++++++
+ Client + 192.168.122.1/24 (真实机做客户端)
++++++++++++
________________|________________ 浮动IP eth0:1 192.168.122.254/24
| |
+++++++++++++ +++++++++++++
+ Director master + + Director backup +
+++++++++++++ +++++++++++++
DIP eth0 192.168.122.10/24 DIP eth0 192.168.122.20/24
|______________________________|
______________|_______________
| |
| |
++++++++++++ ++++++++++++
+ HTML A + + HTML B +
++++++++++++ ++++++++++++
eth0 192.168.122.30/24 eth0 192.168.122.40/24
环境检查:
1.Director服务器需要设置主机名
Direcotr1.uplooking.com
Director2.uplooking.com
2.在2个Director服务器上,需要在/etc/hosts文件中添加解析
192.168.122.10 Director1.uplooking.com Director1
192.168.122.20 Director2.uplooking.com Director2
安装Heartbeat所需要的rpm软件包在Heartbeat目录中,这些包之间存在依赖性,需要使用yum安装方式,可以选择在物理机上搭建一个
ftp的yum源,虚拟机在yum配置文件中指向安装源.物理机创建Hearbeat安装源