wget http://www.keepalived.org/software/keepalived-1.2.17.tar.gz
tar -xvf keepalived-1.2.17.tar.gz
cd keepalived-1.2.17
./configure --prefix=/usr/local/keepalived
make && make install
cp /usr/local/keepalived/sbin/keepalived /usr/sbin
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/
修改系统配置:
vi /etc/sysconfig/keepalived
KEEPALIVED_OPTIONS = "-D -d -S 0 -f /usr/local/keepalived/etc/keepalived/keepalived.conf" #指定配置文件路径,-d -S 选项打开调试日志