1. 下载地址:
      点我下载
    2. 通过ftp工具上传到linux中,/home/software
      Keepalived安装部署 - 图1
    3. 解压

      1. tar -zxvf keepalived-2.0.18.tar.gz
    4. 解压后进入到解压出来的目录,看到会有configure,那么就可以做配置了(配置安装和nginx一模一样)
      Keepalived安装部署 - 图2

    5. 使用configure命令配置安装目录与核心配置文件所在位置:
      1. ./configure --prefix=/usr/local/keepalived --sysconf=/etc
    • prefix:keepalived安装的位置
    • sysconf:keepalived核心配置文件所在位置,固定位置,改成其他位置则keepalived启动不了,/var/log/messages中会报错

    5.1. 配置过程中可能会出现警告信息,如下所示:

    1. *** WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS.

    5.2. 安装libnl/libnl-3依赖

    1. yum -y install libnl libnl-devel

    5.3. 重新configure一下,此时OK。

    1. 安装keepalived

      1. make && make install
    2. 进入到/etc/keepalived,该目录下为keepalived核心配置文件
      Keepalived安装部署 - 图3如果忘记安装配置的目录,则通过如下命令找到:
      Keepalived安装部署 - 图4