标签:ali inter virt ace state out date vim编辑器 ice
一、在haproxy容器安装Keepalived
1、进入haproxy容器: docker exec -it h1 bash
2、apt-get update(因为haproxy容器为Ubuntu)
3、apt-get install -y keepalived
二、配置:
1、安装vim编辑器:apt-get install -y vim
2、编辑keepalived.conf文件:vim /etc/keepalived/keepalived.conf
vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 51 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 123456 } virtual_ipaddress { 172.18.0.201 } }
3、开启keepalived:service keepalived start
4、检测:在宿主机ping接keepalived的ip,看是否能ping接成功
ping 172.18.0.201
标签:ali inter virt ace state out date vim编辑器 ice
原文地址:https://www.cnblogs.com/zhengchuzhou/p/9749613.html