Tudor is a techie turned manager who fights like mad to keep his tech skills honed and relevant. Everything from web hosting, networking, *nix and the like. Constantly developing and co-ordinating with others to make the web a better (and easier to use) place.
Tuesday, 22nd Feb 2011 Posted @ 09:34
So installing CARP was easy enough.
yum install carp -yThe you need to configure the file
/etc/sysconfig/carp/vip-001.conf
:#Virtual IP configuration file for UCARPYou then need to create a
# The number (from 001 to 255) in the name of the file is the identifier
# $Id: vip-001.conf.example 1527 2004-07-09 15:23:54Z dude $
# Set the same password on all mamchines sharing the same virtual IP
PASSWORD="[your password]"
# You are required to have an IPADDR= line in the configuration file for
# this interface (so no DHCP allowed)
BIND_INTERFACE="eth0"
# Do *NOT* use a main interface for the virtual IP, use an ethX:Y alias
# with the corresponding /etc/sysconfig/network-scripts/ifcfg-ethX:Y file
# already configured and ith ONBOOT=no
VIP_INTERFACE="eth0:0"
# If you have extra options to add, see "ucarp --help" output
# (the lower the "-k" the higher priority and "-P" to become master ASAP)
OPTIONS="-k 128 -P"
/etc/sysconfig/network-scripts/ifcfg-eth0:0
file that contains:DEVICE=eth0:0Then you just need the following to finish it all of:
ONBOOT=no
BOOTPROTO=
IPADDR=[the VIP address]
NETMASK=255.255.255.255
USERCTL=yes
IPV6INIT=no
chkconfig --add carpIf there are no errors - you are done and can move to the next machine to be part of the failover group.
chkconfig carp on
service carp start
[ no comments : Add ]