当前位置: 代码迷 >> 综合 >> keepalived(源码安装)+lvs+apache高可用配置搭建
  详细解决方案

keepalived(源码安装)+lvs+apache高可用配置搭建

热度:28   发布时间:2023-12-08 21:08:29.0

1.配置要求

服务器:
server1:172.25.13.1 web1 rhel6.5
server2:172.25.13.2 web2 rhel6.5
server4:172.15.13.4 node1 rhel6.5
server5:172.25.13.5 node2 rhel6.5

VIP:172.25.13.100

软件:
keepalived-1.2.24.tar.gz
arptables_jf
httpd

2.软件安装及配置

[server1]

yum install -y httpd arptables_jf
echo 'ip addr add 172.25.13.100/24 dev eth0'>>/etc/rc.d/rc.local
/etc/rc.d/rc.local
arptables -A OUT -s 172.25.13.100 -j mangle --mangle-ip-s 172.25.13.1
/etc/init.d/httpd start

[server2]

yum install -y httpd arptables_jf
echo 'ip addr add 172.25.13.100/24 dev eth0'>>/etc/rc.d/rc.local
/etc/rc.d/rc.local
arptables -A OUT 
  相关解决方案