CentOS7安装Keepalived详细步骤

1.首先先去Keepalived官网上下载:官网地址
CentOS7安装Keepalived详细步骤_第1张图片
2.把下载好的Keepalived压缩包上传到我们的CentOS7系统上,然后输入下面解压命令进行解压。

tar -zxvf keepalived-2.0.18.tar.gz

CentOS7安装Keepalived详细步骤_第2张图片
3.先进入Keepalived目录,然后输入配置命令进行配置(--prefix:指明Keepalived的安装位置,--sysconf:指明Keepalived配置文件存放位置,必须放在/etc下面,为了后续Keepalived启动关闭不报错)。

cd keepalived-2.0.18
./configure --prefix=/usr/local/keepalived --sysconf=/etc

注意:如果执行配置命令,出现以下警告信息,要先进行libnl核心库依赖安装:

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

libnl核心库依赖安装命令:yum -y install libnl libnl-devel

4.执行完上面命令之后,这时候Keepalived目录里面多了个Makefile的文件,这时候我们可以进行安装了。
CentOS7安装Keepalived详细步骤_第3张图片
输入命令:make && make install
这时候可以看到我们已经安装完成了,Keepalived安装在 /usr/local/keepalived 目录下,它的核心配置文件/etc/keepalived 目录下。
在这里插入图片描述

你可能感兴趣的:(开发记录,linux,centos,运维)