Keepalived+HAProxy高可用搭建
📅 2015-01-06
Keepalived实现了一套VRRP协议(虚拟路由协议),这个协议允许服务器可以动态的设置IP路由。 使用Keepalived可以加强负载均衡软件的可用性。
环境信息 #
1192.168.61.3 ha1 - MASTER
2192.168.61.4 ha2 - BACKUP
Keepalived编译安装 #
1yum -y install openssl-devel
2
3wget http://www.keepalived.org/software/keepalived-<version>.tar.gz
4tar -zxvf keepalived-<version>.tar.gz
5cd keepalived-<version>
6./configure --prefix=/usr/local/keepalived
7
8make
9make install
安装psmisc #
安装psmisc,可使用 killall -0 haproxy
检查haproxy实例是否存活,性能高于ps。