下载站点:
1、http://www.keepalived.org/download.html
2、http://keepalived.org/software
cd /tmp
curl --progress http://keepalived.org/software/keepalived-2.0.6.tar.gz | tar xz
2、编译
cd keepalived-2.0.6
./configure
# 此处可以--prefix 来指定编译的软件安装路径usr/local/ewifi/keepalived_v/keepalived-2.0.6
make && make install
编译出现错误:
configure: error: libnfnetlink headers missing
此时需要安装:
yum -y install libnfnetlink-devel
PS:编译时出现问题,基本上安装xx-devel即可
此时在执行./configure --prefix=usr/local/ewifi/keepalived_v/keepalived-2.0.6
出现如下提示,即编译成功。
Keepalived configuration
------------------------
Keepalived version : 2.0.6
Compiler : gcc
Preprocessor flags : -I/usr/include/libnl3
Compiler flags : -Wall -Wunused -Wstrict-prototypes -Wextra -Winit-self -g -D_GNU_SOURCE -fPIE -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -O2
Linker flags : -pie
Extra Lib : -lcrypto -lssl -lnl-genl-3 -lnl-3
Use IPVS Framework : Yes
IPVS use libnl : Yes
IPVS syncd attributes : No
IPVS 64 bit stats : No
fwmark socket support : Yes
Use VRRP Framework : Yes
Use VRRP VMAC : Yes
Use VRRP authentication : Yes
With ip rules/routes : Yes
Use BFD Framework : No
SNMP vrrp support : No
SNMP checker support : No
SNMP RFCv2 support : No
SNMP RFCv3 support : No
DBUS support : No
SHA1 support : No
Use Json output : No
libnl version : 3
Use IPv4 devconf : No
Use libiptc : No
Use libipset : No
init type : systemd
Build genhash : Yes
Build documentation : No
3、自启动脚本