当前位置: 代码迷 >> 综合 >> heartbeat(高可用)+LVS(负载均衡+健康检查)服务配置(apache测试)
  详细解决方案

heartbeat(高可用)+LVS(负载均衡+健康检查)服务配置(apache测试)

热度:81   发布时间:2023-12-08 21:08:56.0

heartbeat+LVS搭建

1.环境准备

四台服务器:
1.server1:172.25.13.1/24
2.server2:172.25.13.2/24
3.server4:172.25.13.4/24
4.server5:172.25.13.5/24
四台服务器都要关闭ipatbles和selinux
#/etc/init.d/iptables stop
#setenforce 0
cat /etc/hosts
172.25.254.1 server1
172.25.254.2 server2
172.25.254.3 server3
172.25.254.4 server4
172.25.254.5 server5
172.25.254.6 server6
172.25.254.65 server0

heartbeat软件包:
1.heartbeat-3.0.4-2.el6.x86_64.rpm
2.heartbeat-libs-3.0.4-2.el6.x86_64.rpm
3.ldirectord-3.9.5-3.1.x86_64.rpm ##LVS模块

下载地址:
http://www.linux-ha.org/wiki/Downloads

2.安装配置软件并启动服务
1) 安装heartbeat及相关软件
[server1][server2]

yum install -y heartbeat-3.0.4-2.el6.x86_64.rpm  
yum install -y heartbeat-libs-3.0.4-2.el6.x86_64.rpm
yum install -y ldirectord-3.9.5-3.1.x86_64.rpm 
yum install -y httpd

[server4][server5]

yum install arptables_jf -y
yum install httpd -y

如果安装出错,尝试将yum源修改为如下(172.25.254.65为镜像服务器):

name=Server
baseurl=http://
  相关解决方案