# 节点分布情况 LVS-dr-master eth0: 192.168.146.141
LVS-dr-slave eth0: 192.168.146.142
nginx1: eth0: 192.168.146.139 nginx2: eth0: 192.168.146.140 tomcat1: eth0: 192.168.146.138 启用了4个tomcat
VIP: 192.168.146.200 # 拓扑如下所示
# 具体配置 ### lvs master ### 1、安装ipvsadm、keepalived
### 2、使用keepalived来管理lvs 脚本:
### lvs slave ### 1、安装ipvsadm、keepalived
### 2、使用keepalived来管理lvs
### nginx1 ### nginx上要跑个脚本
### nginx2 ### nginx上要跑个脚本
### 后端tomcat安装省略
采用一机多实例模式(非多虚拟主机)
### 测试
### master上验证
### slave上验证
参考文章: http://www.5ilinux.com/2014/05/lvs_keepalived_nginx_tomcat.html (责任编辑:IT) |