Keepalived installation Configuration

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.