Configure keepalived for ip failover CentOS 6

Configure keepalived for ip failover CentOS 6

Configure keepalived for ip failover CentOS 6

In this scenario we are going to be configuring 2 squid proxy servers to represent one virtual IP. This is useful for creating an active/passive configuration between two linux servers. Let’s get started

login to both of your servers, and su to root

from here we need to install the pre-requisite packages on each server

now we install the keepalived service on each of the servers

edit the keepalive configuration on server1

customize lines 5-7 and 9-10

edit line 26 to have the “virtual ip” that you want for the two nodes

configure server1 to run the keepalive service on startup, as well as now

you should now be able to ping your virtual IP, proceed and do the same thing with server2, however change the priority to a lower number

restart services, and test the failvoer

you can view logs/status from the messages log file

example of failback:

that’s it!

Hosted Linux Servers at www.zwiegnet.com/go

Leave a Reply

Your email address will not be published. Required fields are marked *