keepalived互为主从

准备主备两台主机

1.主机安装keepalived

 

 

 2.配置主机keepalived配置文件 

 

 

 3.备机安装keepalived

 

4.备机配置keepalived配置文件 

5.主机备机重启keepalived

 

6.查看ip,网卡

 

 7.停掉主机,测试主备切换

 

 

 

 8.测试完毕,可以切换

 

posted @ 2021-01-15 16:02  鸿杨杨  阅读(138)  评论(0编辑  收藏  举报