keepalived install in CentOS 6.x x64

下载最新稳定版本
# wget http://www.keepalived.org/software/keepalived-1.2.13.tar.gz
# tar -zxvf keepalived-1.2.13.tar.gz
# cd keepalived-1.2.13

查看INSTALL, 了解requirement
Kernel needing
==============

  Compile a kernel with the following options :

  Kernel/User netlink socket
  Network firewalls (for Kernel 2.2)
  LinuxVirtualServer

  Keepalived support all LVS code : including IPVS code for kernel 2.2
  and kernel 2.4

Libraries dependency
====================

  In order to compile Keepalived needs the following libraries :

  * OpenSSL, <www.openssl.org>
  * popt


安装requirement :
[root@150 keepalived-1.2.13]# ldconfig -p|grep ssl
        libssl3.so (libc6,x86-64) => /usr/lib64/libssl3.so
        libssl.so.10 (libc6,x86-64) => /usr/lib64/libssl.so.10
        libssl.so (libc6,x86-64) => /usr/lib64/libssl.so
[root@150 keepalived-1.2.13]# ldconfig -p|grep popt
        libpopt.so.0 (libc6,x86-64) => /lib64/libpopt.so.0

[root@150 keepalived-1.2.13]# rpm -qf /lib64/libpopt.so.0
popt-1.13-7.el6.x86_64
[root@150 keepalived-1.2.13]# rpm -qf /usr/lib64/libssl.so
openssl-devel-1.0.1e-16.el6_5.15.x86_64

[root@150 keepalived-1.2.13]# yum install -y popt openssl-devel

openssl版本注意心脏流血漏洞问题, 使用没有漏洞的版本.
http://www.openssl.org/news/vulnerabilities.html


安装keepalived
# cd keepalived-1.2.13
# ./configure --prefix=/opt/keepalived-1.2.13

Keepalived configuration
------------------------
Keepalived version       : 1.2.13
Compiler                 : gcc
Compiler flags           : -g -O2
Extra Lib                : -lssl -lcrypto -lcrypt 
Use IPVS Framework       : Yes
IPVS sync daemon support : Yes
IPVS use libnl           : No   -- 需安装libnl-devel
fwmark socket support    : Yes
Use VRRP Framework       : Yes
Use VRRP VMAC            : Yes
SNMP support             : No  -- 需net-snmp-devel, 并开启enable-snmp
SHA1 support             : No
Use Debug flags          : No

# yum install -y libnl-devel

# ./configure --prefix=/opt/keepalived-1.2.13 --enable-snmp --enable-sha1
Keepalived configuration
------------------------
Keepalived version       : 1.2.13
Compiler                 : gcc
Compiler flags           : -g -O2 -DFALLBACK_LIBNL1 -DFEAT_SHA1
Extra Lib                : -lcrypto -Wl,-z,relro -Wl,-z,now -L/usr/lib64 -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE -lssl -lcrypto -lcrypt  -lnl  
Use IPVS Framework       : Yes
IPVS sync daemon support : Yes
IPVS use libnl           : Yes
fwmark socket support    : Yes
Use VRRP Framework       : Yes
Use VRRP VMAC            : Yes
SNMP support             : Yes
SHA1 support             : Yes
Use Debug flags          : No

# gmake && gmake install


基本配置, 路径和man添加到profile :
# ln -s /opt/keepalived-1.2.13 /opt/keepalived
[root@150 keepalived]# cd /opt/keepalived
[root@150 keepalived]# ll
total 16
drwxr-xr-x 2 root root 4096 Aug 19 09:20 bin
drwxr-xr-x 5 root root 4096 Aug 19 09:20 etc
drwxr-xr-x 2 root root 4096 Aug 19 09:20 sbin
drwxr-xr-x 3 root root 4096 Aug 19 09:20 share

# vi /etc/profile
export PATH=/opt/keepalived/bin:/opt/keepalived/sbin:$PATH
export MANPATH=/opt/keepalived/share/man:$MANPATH

[root@150 keepalived]# . /etc/profile
[root@150 keepalived]# which keepalived
/opt/keepalived/sbin/keepalived


[参考]
3. man keepalived
man keepalived.conf
man genhash
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值