===== Keepalived =====
* Master IP : 10.179.210.103
* Slave IP : 10.179.210.140
* Virtual IP :10.179.210.100
==== Platforms ====
=== Oracle/RHEL/CentOS 8 ===
To install Oracle 8 Application Stream repository
dnf install epel-release
dnf install keepalived
=== Keepalived configuration on master machine ===
Configuration file in ''/etc/keepalived/keepalived.conf''
Notice PRIORITY is 200 compared to slave node which has 100
! Configuration File for keepalived
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 200
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
10.179.210.100
}
}
=== Keepalived configuration on slave machine ===
vrrp_instance VI_1 {
state SLAVE
interface eth0
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
10.179.210.100
}
}
[[https://tecadmin.net/ip-failover-setup-using-keepalived-on-centos-redhat/]]
==== Starting order ====
Make sure you start the MASTER first before the SLAVE node
''systemctl restart keepalived''
then on slave node
''systemctl restart keepalived''