Este conteúdo não está disponível no idioma selecionado.
A.3. Install and Configure keepalived
Perform the following procedure on your two HAProxy nodes:
- Install keepalived.
yum install -y keepalived
# yum install -y keepalivedCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure keepalived.
vim /etc/keepalived/keepalived.conf
# vim /etc/keepalived/keepalived.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow In the following configuration, there is a script to check the HAProxy processes. The instance useseth0as the network interface and configureshaproxyas the master server andhaproxy2as the backup server. It also assigns a virtual IP address of 192.168.0.100.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Enable and start keepalived.
systemctl enable keepalived systemctl start keepalived
# systemctl enable keepalived # systemctl start keepalivedCopy to Clipboard Copied! Toggle word wrap Toggle overflow