Keepalived安装可参考Mysql+Keepalived实现双主热备,实验环境,准备2台设备,设备1 192.168.217.11 nginx +keepalived,设备2 192.168.217.12 nginx +keepalived,虚拟ip 192.168.217.3,设备1、2 安装nginx keepalived,(此处设备已安装nginx),我们在此基础上直接利用yum安装keepalived,更新网络yum源,安装keepalived,启动nginx,修改keepalived配置文件,查看ip,重启keepalived,关闭防火墙 内核,验证,实验环境 ,准备2台设备 双主keepalived,设备1 192.168.217.11 nginx +keepalived,设备2 192.168.217.12 nginx +keepalived,虚拟ip 192.168.217.3,虚拟ip 192.168.217.6,在以上实验基础上,设备1,设备2,xshell同时开启 命令模式 重启keepalived,查看ip,设备1 飘逸Ip正常,设备2,设备1、设备2验证 (此问题暂未解决),以上为个人经验,希望能给大家一个参考,也希望大家多多支持。