Keepalived ist eine Software um Hochverfügbarkeit in Linux Umgebungen zu gewährleisten. Keepalived verwendet u.a VRRP (https://docs.linuxfabrik.ch/software/keepalived.html#vrrp-advertisement)
sudo apt install -y keepalived
Die Konfig liegt unter
/etc/keepalived/keepalived.conf
Das Github Repo verwendet autoconf.
sudo apt install build-essential libssl-dev libnl-3-dev libnl-genl-3-dev autoconf automake libtool git clone https://github.com/acassen/keepalived.git cd keepalived ./autogen.sh ./configure make sudo make install sudo keepalived -v
sudo nano /etc/systemd/system/keepalived.service
[Unit] Description=Keepalived Daemon After=network.target [Service] Type=simple ExecStart=/usr/local/sbin/keepalived --dont-fork --log-console Restart=always [Install] WantedBy=multi-user.target
sudo systemctl daemon-reexec sudo systemctl daemon-reload sudo systemctl enable keepalived sudo systemctl start keepalived
vrrp_instance VI_1 {
state MASTER
interface ens160
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass geheim
}
virtual_ipaddress {
172.21.0.166
}
}
vrrp_instance VI_1 {
state BACKUP
interface ens160
virtual_router_id 51
priority 90
advert_int 1
authentication {
auth_type PASS
auth_pass geheim
}
virtual_ipaddress {
172.21.0.166
}
}
Man kann Prozesse, Dateien, Interfaces und eigene Scripte „tracken“.
Siehe https://docs.linuxfabrik.ch/software/keepalived.html#prozesse-mit-keepalived-tracken.