#!/bin/bash
tar xf keepalived-1.1.17.tar.gz
cd keepalived-1.1.17
yum -y install openssl-* kernel-devel popt-* gcc-*
ln -s /usr/src/kernels/2.6.32-431.el6.x86_64 /usr/src/linux
./configure --prefix=/usr/local/keepalived
make && make install
mkdir /etc/keepalived
cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d
ln -s /usr/local/keepalived/sbin/keepalived /sbin/