keepalived源码包下载地址:Keepalived for Linux
下载完之后传到服务器上
检查安装环境
yum install curl gcc openssl-devel libnl3-devel net-snmp-devel libnfnetlink-devel -y
进入源码包目录
解压
tar xf keepalived-2.1.5.tar.gz
cd keepalived-2.1.5
编译
./configure --prefix=/usr/local/keepalived --sysconf=/etc
安装
make && make install
配置
主备节点分别修改配置
vi /etc/keepalived/keepalived.conf
! Configuration File for keepalived
global_defs {
notification_email {
ops@wangshibo.cn
tech@wangshibo.cn
}
notif