升级keepalived
进去官网下载最新的版本2.2.1
现在到/server/tools下面
解压
cd keepalived-2.2.1 ./configure make sudo make install
It is a general recommendation when compiling from source to specify a PREFIX. For example:
./configure --prefix=/usr/local/keepalived
查看启动命令
1;systemctl daemon-reload 重新加载
2:systemctl enable keepalived.service 设置开机自动启动
3:systemctl disable keepalived.service 取消开机自动启动
4:systemctl start keepalived.service 启动
5:systemctl stop keepalived.service停止
[root@live1796 ~]# keepalived -v
Keepalived v1.3.5 (03/19,2017), git commit v1.3.5-6-g6fa32f2
Copyright(C) 2001-2017 Alexandre Cassen, <acassen@gmail.com>
还是之前版本 需要操作一下步骤
cp /usr/sbin/keepalived /usr/sbin/keepalived.bak
cp /usr/local/keepalived/sbin/keepalived /usr/sbin/
再次查看
[root@live1796 ~]# keepalived -v
Keepalived v2.2.1 (01/17,2021)
Copyright(C) 2001-2021 Alexandre Cassen, <acassen@gmail.com>
Built with kernel headers for Linux 3.10.0
Running on Linux 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018
Distro: CentOS Linux 7 (Core)
configure options: --prefix=/usr/local/keepalived