标签:linux
系统环境
实验环境:VMware? Workstation 12 Pro 12.0.1 build-3160714
系统平台:Red Hat Enterprise Linux 7 64 位
内核版本:3.10.0-123.el7.x86_64
keepalived版本:Keepalived for Linux - Version 1.2.20
Keepalived的安装过程
1 wget http://www.keepalived.org/software/keepalived-1.2.20.tar.gz
2 tar -zxvf keepalived-1.2.20.tar.gz
3 cd keepalived-1.2.20/
4 ./configure --prefix=/usr/local/keepalived //指定安装路径
错误信息
1)提示 “!!! OpenSSL is not properly installed on your system. !!!
!!! Can not include OpenSSL headers files.”
需要安装opendevel:yum -y install openssl-devel
2)提示 ”Keepalive popt libraries is required “
需要安装popt:wget http://rpm5.org/files/popt/popt- 1.16 .tar.gz
3)如果configure就提示GCC NO
需要安装gcc : yum -y install gcc
yum install libnl-devel openssl-devel libnfnetlink-devel gcc ipvsadm popt-devel libnfnetlink kernel-devel
编译结果
Keepalived configuration
------------------------
Keepalived version : 1.2.20 ##version##
Compiler : gcc ##编译工具##
Compiler flags : -g -O2 -DFALLBACK_LIBNL1 ##参数##
Extra Lib : -lssl -lcrypto -lcrypt -lnl ##扩展库##
Use IPVS Framework : Yes ##LVS核心代码框架,不使用LVS可以编译时--disable-lvs## 负载均衡模块
IPVS sync daemon support : Yes ##IPVS同步进程,是否开启取决于 IPVS FRAMEWORK###不使用添加参数--disable-lvs-syncd
IPVS use libnl : Yes ##是否使用libnl库##
fwmark socket support : Yes ##套接字框架##
Use VRRP Framework : Yes ##VRRP框架,keepalived的核心进程vrrpd##
Use VRRP VMAC : No ##VRRP Virtual mac##
Use VRRP authentication : Yes
SNMP keepalived support : No
SNMP checker support : No
SNMP RFCv2 support : No
SNMP RFCv3 support : No
SHA1 support : No
Use Debug flags : No
libnl version : 1
Use IPv4 devconf : No
Use libiptc : No
Use libipset : No
5 make && make install
6 ln -s /usr/local/keepalived/sbin/keepalived /usr/bin/keepalived //将keepalived命令软连接到/usr/bin下
7 cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/keepalived
8 chmod 755 /etc/init.d/keepalived
9 chkconfig keepalived on
10 修改/etc/init.d/keepalived
# Source configuration file (we set KEEPALIVED_OPTIONS there)
. /etc/sysconfig/keepalived
改为:
# Source configuration file (we set KEEPALIVED_OPTIONS there)
. /usr/local/keepalived/etc/sysconfig/keepalived
11 mkdir /etc/keepalived
12 ln -s /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf
13 service keepalived restart
标签:linux
原文地址:http://wjb10000.blog.51cto.com/9702295/1788386