lvs+keepalived部署高可用集群


本环境基于centos7部署,基本架构图:
client ip:192.168.1.101lvs1 ip:192.168.1.173lvs2 ip:192.168.1.110web1:192.168.1.114web2:192.168.1.119VIP: 192.168.1.10
部署流程:lvs1:
# yum install ipvsadm# ipvsadm#查看是否输出安装成功# yum install keepalived# vim /etc/keepalived/keepalived.confglobal_defs { notification开发云主机域名_email {xxx@qq.com } notification_email_from xxx@q开发云主机域名q.com smtp_server smtp.qq.com smtp_connect_timeout 30 router_id LVS1}
vrrp_instance VI_1 { state MASTER interface ens33 virtual_rou开发云主机域名ter_id 51 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 1111 } virtual_ipaddress { 192.168.1.10 }}
virtual_server 192.168.1.10 80 { delay_loop 6 lb_algo rr lb_kind DR nat_mask 255.255.255.0 persistence_timeout 50 protocol TCP
real_server 192.168.1.114 80 { weight 1TCP_CHECK { connect_timeout 3 nb_get_retry 3 delay_before_retry 3 } }
real_server 192.168.1.119 80 { weight 1 TCP_CHECK { connect_timeout 3 nb_get_retry 3 delay_before_retry 3 } }}
# vim /etc/sysctl.conf#开启路由转发net.ipv4.ip_forward= 1# sysctl -p# service keepalived start
lvs2配置跟lvs大致相同# vim /etc/keepalived/keepalived.confstate BACKUP#service keepalived start
后端web服务器使用nginx即可浏览器请求http://192.168.1.10 #ipvsadm -l#查看调度信息

相关推荐: SCCM部署(九)—DHCP 配置

测试环境的DHCP安装在AD服务器上,安装过程不做赘述。如要使用SCCM中操作系统分发的功能,必须配置DHCP作用开发云主机域名域的66、67选项。其中选项66指定分发系统开发云主机域名的服务器,6开发云主机域名7选项指定网络分发的启动文件。相关推荐: 让sh…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

Like (0)
Donate 微信扫一扫 微信扫一扫
Previous 03/17 11:26
Next 03/17 11:26

相关推荐