搭建keepalive+http双机热备
1、搭建keepalive+http双机热备
本文介绍利用CentOS 7.X搭建keepalive+http双机热备
CentOS 7.X为最小化安装,实验环境如下:
Keepalive Server:
192.168.128.11/24
192.168.128.12/24
192.168.128.20/24(虚IP)
HTPP Server:
192.168.128.13/24
192.168.128.14/24
1.1 安装基本软件
Keepalive Server:
yum -y install keepalived ipvsadm
HTTP Server:
yum -y install httpd
1.2 修改keepalive配置文件
修改主Keepalived Server配置文件/etc/keepalived/keepalived.conf,如下
! Configuration File for keepalived
global_defs {
notification_email {
}
}
vrrp_instance VI_1 {
state MASTER
interface ens33
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth