web1 IP 192.168.0.47 web2 IP 192.168.0.48 haproxy_master 192.168.0.200 haproxy_backup 192.168.0.199 VIP 192.168.0.155 一.安装keepalived #wget http://www.keepalived.org/software/kee
#vi/etc/keepalived/keepalived.conf ! Configuration File for keepalived global_defs { notification_email { xxx@gmail.com } notification_email_from xxx@gmail.com smtp_server 127.0.0.1
#!/bin/bash #LVS-dr.sh vip=192.168.1.254 rip1=192.168.1.1 rip2=192.168.1.2 START(){ ifconfig eth0:vip ${vip}/32 up ipvsadm -C ipvsadm -A -t ${vip}:80 -s rr ipvsadm -a -t ${vip}:80 -r ${rip1
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号