Linux centos7 安装 keepalived-2.0.6
1.下载(版本:2.0.6)
cd /home/install/
wget http://124.205.69.170/files/1255000006EF2AA1/www.keepalived.org/software/keepalived-2.0.6.tar.gz
2.解压
tar -zxvf keepalived-2.0.6.tar.gz -C /usr/local/
3.编译安装
1)进入安装目录
cd /usr/local/keepalived-2.0.6/
2)安装
./configure --prefix=/usr/local/keepalived
如果提示 *** WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS.
yum -y install libnl libnl-devel
如果提示 configure: error: libnfnetlink headers missing
yum install -y libnfnetlink-devel
再执行 ./configure --prefix=/usr/local/keepalived
无错误提示进行下步
make && make install
查看是否安装成功
4.配置开机启动服务
cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf
cp /usr/local/keepalived-2.0.6/keepalived/etc/init.d/keepalived /etc/rc.d/init.d/keepalived
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/keepalived
cd /usr/lib/systemd/system/
启动
systemctl start keepalived
开机启动
systemctl enable keepalived.service
查看是否开机启动
systemctl is-enabled keepalived.service