Setting up Keepalived - Installation

tested on slackware current (oct 2021) and debian12

Warning

about keepalived logs: the debian build for keepalive was not compiled with –enable-log-file so the trick for debugging as follows

Requirements

    slackpkg install sysvinit-functions
    ls -lF /etc/rc.d/init.d/functions
    ls -lF /sbin/consoletype

    slackpkg install iptables libnftnl libpcap dbus-1
    slackpkg install nftables jansson

Install

slackware

    sbopkg -i keepalived
    cat /etc/default/keepalived # no change required

we need a dedicated user for the check and notify scripts to run

    grep ^keepalive /etc/group
    grep ^keepalive /etc/passwd

    groupadd --system keepalive
    useradd --system -s /bin/bash -g keepalive -d /var/tmp --no-create-home keepalive
    # -s /sbin/nologin

Troubleshooting

(seen with the debian build)

    -g requires configure option --enable-log-file

==> enable at build time or be happy with syslog

Resources

https://slackbuilds.org/repository/15.0/network/keepalived/

troubles

https://serverfault.com/questions/1115426/keepalived-with-log-file-doesnt-work ==> enable at build time


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun