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