2.centos7安装keepalived[使用keepalived搭建nginx主备]

专栏目录

  1. keepalived简介[使用keepalived搭建nginx主备]
  2. centos7安装keepalived[使用keepalived搭建nginx主备]
  3. keepalived配置详解[使用keepalived搭建nginx主备]
  4. keepalived守护nginx[使用keepalived搭建nginx主备]
  5. keepalived邮件通知[使用keepalived搭建nginx主备]
  6. keepalived主备配置[使用keepalived搭建nginx主备]

安装keepalived

cd /usr/local/src
wget -c http://www.keepalived.org/software/keepalived-1.4.4.tar.gz
tar -zxvf keepalived-1.4.4.tar.gz
cd keepalived-1.4.4/
./configure --prefix=/usr/local/keepalived
发现异常
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/keepalived-1.4.4':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
安装gcc
yum install gcc
发现异常
...
checking for pipe2... yes
checking whether ETHERTYPE_IPV6 is declared... yes
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
configure: error: 
  !!! OpenSSL is not properly installed on your system. !!!
  !!! Can not include OpenSSL headers files.            !!!
安装OpenSSL
yum -y install openssl-devel
./configure --prefix=/usr/local/keepalived
发生异常
*** WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS.
安装libnl3
yum search libnl
yum install libnl3-devel.x86_64
./configure --prefix=/usr/local/keepalived
发生异常
configure: error: libnfnetlink headers missing
安装libnfnetlink
yum install -y libnfnetlink-devel
./configure --prefix=/usr/local/keepalived

编译keepalived

make && make install

你可能感兴趣的:(linux)