1. Environment configuration
Ln-s/usr/src/kernels/2.6. -573.26. 1. el6.x86_64//usr/src/linux
If there is nothing under/usr/src/kernels/, install Kernel-devel (yum install kernel-devel) first.
2. Two Linux per installation keepalived
TAR-ZXVF keepalived-1.2. + . tar.gz. /Configuremake make Installecho $?
cp/usr/local/etc/rc.d/init.d/keepalived/etc/init.d//usr/local/etc/sysconfig/keepalived/etc/sysconfig/ /etc//usr/local/etc/keepalived/keepalived.conf /etc/keepalived//usr/local/sbin/ keepalived/usr/bin/
/etc/init.d/-ef|grep Keep
3. Modify the configuration file
Master node:
Standby node:
4. Testing
5. Multi-instance Setup
6. Log settings (keepalived log default in/var/log/messages):
Set the keepalived to generate a separate log file:
vim/etc/sysconfig/keepalived#keepalived_options="- D"keepalived_options="-d-s 0-d"Vim/etc/rsyslog.conf #keepalived loglocal0.* /var/log/Keepalived.log[[email protected]~]#/etc/init.d/rsyslog restartshutting down system logger: [OK]starting System Logger: [OK] [[Email protected]~]#/etc/init.d/keepalived restartstopping keepalived: [OK]starting keepalived:
[email protected] log]# ll Keepalived.log
-RW-------. 1 root root 34922 may 18:11 Keepalived.log
Keepalived installation Configuration