keepalived_install.sh:
#cat keepalived_install.sh #!/bin/bash pkg=keepalived-2.0.10.tar.gz tar xf $pkg yum -y install kernel-devel ln -s /usr/src/kernels/3.10.0-862.el7.x86_64/ /usr/src/linux cd keepalived-2.0.10/ yum install openssl-* -y ./configure --prefix=/usr/local/keepalived make make install mkdir -pv /etc/keepalived cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/ ln -s /usr/local/keepalived/sbin/keepalived /sbin/
启动脚本进行安装:
sh keepalived_install.sh
安装好后配置文件keepalived.conf在/etc/keepalived目录下。