yum install perl perl-devel popt popt-devel libnl libnl-devel libssl libssl-devel openssl openssl-devel popt-static
yum -y install ncurses ncurses-devel
1 下载源码
git clone https://github.com/alibaba/LVS.git
2编译内核
cd /usr/local/src/LVS-lvs_v2/kernel
vi .config
CONFIG_SYSFS_DEPRECATED=n
mkdir -p /usr/src/kernels/2.6.32
make O=/usr/src/kernels/2.6.32 menuconfig; #选择模块需要编译的,exit退出,选择 YES保存
make mrproper
make O=/usr/src/kernels/2.6.32
make O=/usr/src/kernels/2.6.32 modules_install install
2 安装keepalived
cd /usr/local/src/LVS/tools/keepalived/
./configure --prefix=/usr/local/keepalived --with-kernel-dir=/usr/local/src/LVS-lvs_v2/kernel;
make
最终结果:
Use Debug flags : No
make
make install
cd /usr/local/src/LVS-lvs_v2/tools/ipvsadm/
make
make install
[[email protected] ipvsadm]# make install
cd /usr/local/src/LVS-lvs_v2/tools/quagga
./configure --prefix=/usr/local/quagga
make
make install
参照博客http://blog.51cto.com/tianshili/1638486