1、安装keepalived
解压后 ./configure --prefix=/usr/local/keepalived
make&&make install
2、拷贝设置
mkdir /etc/keepalived
cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/
拷贝服务脚本到默认地址
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig
ln -s /usr/local/sbin/keepalive /usr/sbin
ln -s /usr/local/keepalived/sbin/keepalived /sbin
设置开机启动
chkconfig keepalived on