在Nginx容器安装Keepalived后端项目双机热备

docker exec -it n1 bash
apt-get update
apt-get install keepalived apt-get install vim 再次之前要配置VIP虚拟IP docker network create --subnet=192.168.99.151/16 net1
docker network ls
这里还要设置下vim 无法粘贴问题 vi /etc/keepalived/keepalived.conf
启动keepalived
service keepalived start docker run -it -d --name n2 -v /home/n2/nginx.conf:/etc/nginx/nginx.conf --net=host --privileged nginx
重复上面步骤
上一篇:Android ListView 自定义 Adapter


下一篇:CAS 4.0 单点登录教程