back up 如何在第一个模式下,当一个服务器挂了,调度器如何将他踢出去

modprobe -r ipip

ipvsadm -C
ipvsadm -A -t 172.25.19.100:80 -s rr
ipvsadm -a -t 172.25.19.100:80 -r 172.25.19.2:80 -g
ipvsadm -a -t 172.25.19.100:80 -r 172.25.19.3:80 -g
systemctl restart ipvsadm.service

ip addr add 172.25.19.100/24 dev eth0 和DR模式操作一样,不作解释了

vim /etc/yum.repos.d/westos.repo(添加yum源)

[rhel7.5]
name=rhel7.5
baseurl=http://172.25.19.250/westos/addons/HighAvailability/
gpgcheck=0

在DR模式下的KEEPALIVE

配置高可用yum源
在DR模式下的KEEPALIVE
高可用yum源地址
在DR模式下的KEEPALIVE

yum install -y ldirectord-3.9.5-3.1.x86_64.rpm 安装监视lvs 健康状况 当server失效时将他从服务器列表删除

在DR模式下的KEEPALIVE

安装
在DR模式下的KEEPALIVE
cp /usr/share/doc/ldirectord-3.9.5/ldirectord.cf /etc/ha.d/
vim /etc/ha.d/ldirectord.cf 配置配置文件yum install -y ldirectord-3.9.5-3.1.x86_64.rpm

cp /usr/share/doc/ldirectord-3.9.5/ldirectord.cf /etc/ha.d/
vim /etc/ha.d/ldirectord.cf

t
在DR模式下的KEEPALIVE

virtual=172.25.19.100:80
real=172.25.19.2:80 gate
real=172.25.19.3:80 gate
fallback=127.0.0.1:80 gate
service=http server1
scheduler=rr
#persistent=600
#netmask=255.255.255.255
protocol=tcp
checktype=negotiate
checkport=80
request=“index.html”
#receive=“Test Page”
#virtualhost=www.x.y.z

/etc/init.d/ldirectord start

virtual=172.25.19.100:80
real=172.25.19.2:80 gate
real=172.25.19.3:80 gate
fallback=127.0.0.1:80 gate
service=http server1
scheduler=rr
#persistent=600
#netmask=255.255.255.255
protocol=tcp
checktype=negotiate
checkport=80
request=“index.html”
#receive=“Test Page”
#virtualhost=www.x.y.z

/etc/init.d/ldirectord star

在DR模式下的KEEPALIVE

在DR模式下的KEEPALIVE

server2
开启httpd
添加100端口eth0上(DR)
在DR模式下的KEEPALIVE

关闭隧道模式
添加端口 和server2操作一样
开启htppd
在DR模式下的KEEPALIVE

真机上测试此时是好的,两个都可以出来
在DR模式下的KEEPALIVE
两个都关

在DR模式下的KEEPALIVE

在DR模式下的KEEPALIVE
编辑调度器默认发布页面
在DR模式下的KEEPALIVE

当两个服务器都down了,显示调度器上的内容
在DR模式下的KEEPALIVE

在DR模式下的KEEPALIVE

相关文章:

  • 2021-04-18
  • 2021-05-07
  • 2021-12-17
  • 2022-12-23
  • 2021-10-02
  • 2021-06-16
  • 2021-12-04
  • 2021-08-23
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-08-31
  • 2022-01-17
  • 2021-11-24
  • 2021-04-08
相关资源
相似解决方案