Keepalived compilation and installation error handling records

1. Background

Due to the localized OS transformation, Keepalived was migrated and redeployed. The on-site version is relatively old and uses version 2.0.6. In this migration, only the configuration files and self-starting services are migrated; other environmental dependencies are considered and recompiled and installed on the target OS.

Resource link: openssl.official website

2. Compile and install

 wget -q http://www.keepalived.org/software/keepalived-2.0.6.tar.gz
 tar -zxvf keepalived-2.0.6.tar.gz
 cd keepalived-2.0.63
 ./configure --prefix=/usr/local/keepalived
 make depend
 make && make install
 cp /usr/local/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/  //在编译后的keepalived目录下
 cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/
 mkdir /etc/keepalived
 cp /usr/local/etc/keepalived/keepalived.conf /etc/keepalived/
 cp /usr/local/sbin/keepalived /usr/sbin/
 chkconfig --add keepalived
 chkconfig --level 345 keepalived on
 systemctl start keepalived
 systemctl status keepalived  //验证vip是否正常
 telnet vip port //验证虚拟服务是否正常

1) The first error: OpenSSL is not properly installed on your system. Can not include OpenSSL headers files.
Insert image description here
This is mainly because the system confirms that the header files that openssl depends on are in the openssl-devel package. Execute:yum install openssl-devel
Insert image description here

2) After completing the above, configure again, and an error message appears: libnl/libnl-3 dev libraries to support IPv6 with IPVS, that is, the libnl/libnl-3 dev library is missing.

Insert image description here
implement:yum install libnl*-devel -y

Insert image description here

3) When executing configure for the third time, an error is reported: configure: error: libnfnetlink headers missing

Insert image description here
implement:yum install libnfnetlink-devel -y

Insert image description here
4) Restore after executing configure again:
Insert image description here
5) make && make install

Insert image description here
Insert image description here

Guess you like

Origin blog.csdn.net/ximenjianxue/article/details/132810251