Installing
Although installing keepalived through yum is quite convenient, the package is often out-of-date.
So it is recommended to install it from source code. To do so, you can follow the instructions here.
If you already installed it through yum, you can upgrade to a new version by
1. Download the source code from official website
2. Extract the files via tar xvf <package_name>
3. Change the working directory to the extracted folder
4. Run ./configure
5. Run make && make install
You will notice that the newer version of keepalived is installed under /usr/local/sbin and the system is still using the old version located at /usr/sbin
So, you need to
- rename the old one
mv /usr/sbin/keepalived /usr/sbin/keepalived.old
- create a symbolic link for the new one
ln -s /usr/local/sbin/keepalived /usr/sbin/
Configuring
The configuration needed to get it working is simple, just reference the previous link.
Attention
If you have firewalld running, you will need to add the following rule in order to permit the vrrp control traffic.
firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" destination address="224.0.0.18" protocol value="ip" accept' --permanent
本文介绍了通过源代码安装Keepalived的方法,并提供了详细的步骤指导。同时,文章还提到了如何配置Keepalived使其正常工作,以及在使用firewalld的情况下如何设置规则允许VRRP控制流量。
1127

被折叠的 条评论
为什么被折叠?



