Keepalived installation

 

Keepalived:
The main goal of the keepalived project is to add a strong & robust keepalive facility to the Linux Virtual Server project. This project is written in C with multilayer TCP/IP stack checks. Keepalived implements a framework based on three family checks : Layer3, Layer4 & Layer5/7. This framework gives the daemon the ability of checking a LVS server pool states. When one of the server of the LVS server pool is down, keepalived informs the linux kernel via a setsockopt call to remove this server entrie from the LVS topology. In addition keepalived implements an independent VRRPv2 stack to handle director failover. So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.

Installation:

OS: Centos 5.6
 ip:eth0 192.168.1.17  netmask 255.255.255.0
 Gateway: 192.168.1.1
 kernel version: 2.6.18-238.19.1.el5

1. Install some essential packages.
linuxdba --> yum install yum-utils
linuxdba --> yumdownloader --source kernel
linuxdba --> mkdir /usr/src/redhat
linuxdba --> rpm -ivh kernel-2.6.18-238.19.1.el5.src.rpm
linuxdba --> ln -s /usr/src/kernels/2.6.18-238.19.1.el5-i686/   /usr/src/linux/
linuxdba --> yum install kernel-devel openssl openssl-devel ipvsadm
linuxdba --> yum install gcc gcc-c++ make
linuxdba --> yum install libnl libnl-devel

2. Install keepalived.
linuxdba --> wget http://www.keepalived.org/software/keepalived-1.2.1.tar.gz
linuxdba --> tar xfv keepalived-1.2.1.tar.gz
linuxdba --> cd keepalived-1.2.1
linuxdba --> ./configure
linuxdba --> make
linuxdba --> make install

3. Configure the keepalived service.
linuxdba -->cp /usr/local/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/
linuxdba -->cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/
linuxdba -->mkdir /etc/keepalived
linuxdba -->cp /usr/local/etc/keepalived/keepalived.conf  /etc/keepalived/
linuxdba -->cp /usr/local/sbin/keepalived /usr/sbin/

4. Start keepalived service
linuxdba -->service keepalived start

Reference page:
http://keepalived.org/documentation.html
http://blog.csdn.net/liuy5277/article/details/6747288

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值