准备主备两台主机
1.主机安装keepalived
2.配置主机keepalived配置文件
3.备机安装keepalived
4.备机配置keepalived配置文件
5.主机备机重启keepalived
6.查看ip,网卡
7.停掉主机,测试主备切换
8.测试完毕,可以切换