专注于 JetBrains IDEA 全家桶,永久激活,教程
持续更新 PyCharm,IDEA,WebStorm,PhpStorm,DataGrip,RubyMine,CLion,AppCode 永久激活教程

005.MySQL双主-Master01可用配置

 [root@Master01 ~]# vim /etc/keepalived/keepalived.conf
 ! Configuration File for keepalived
 global_defs {
    notification_email {
      acassen@firewall.loc
      failover@firewall.loc
      sysadmin@firewall.loc
    }
    notification_email_from Alexandre.Cassen@firewall.loc
    smtp_server 172.24.8.10
    smtp_connect_timeout 30
    router_id LVS_DEVEL
    vrrp_skip_check_adv_addr
    vrrp_strict
    vrrp_garp_interval 0
    vrrp_gna_interval 0
 }
 vrrp_instance HA_1 {
     state BACKUP   #在Master01和Master02上均配置为BACKUP
     interface eth1
     virtual_router_id 51
     priority 100
     advert_int 1
     nopreempt      #不抢占模式,只有优先级高的机器上设置即可,优先级低的机器可不设置
     authentication {
         auth_type PASS
         auth_pass 1111
     }
     virtual_ipaddress {
     172.24.8.12
     }
 }

 virtual_server 172.24.8.12 3306 {
      delay_loop 2
      lb_algo wrr
      lb_kind DR
      persistence_timeout 60    #会话保持时间
      protocol TCP
      real_server 172.24.8.10 3306 {
          weight 3
          notify_down /root/shutdown.sh     #检测到服务down后执行的脚本
          TCP_CHECK {
              connect_timeout 10            #连接超时时间
              nb_get_retry 3            #重连次数
              delay_before_retry 3      #重连间隔时间
              connect_port 3306         #健康检查端口
          }
      }
 }

文章永久链接:https://tech.souyunku.com/20628

未经允许不得转载:搜云库技术团队 » 005.MySQL双主-Master01可用配置

JetBrains 全家桶,激活、破解、教程

提供 JetBrains 全家桶激活码、注册码、破解补丁下载及详细激活教程,支持 IntelliJ IDEA、PyCharm、WebStorm 等工具的永久激活。无论是破解教程,还是最新激活码,均可免费获得,帮助开发者解决常见激活问题,确保轻松破解并快速使用 JetBrains 软件。获取免费的破解补丁和激活码,快速解决激活难题,全面覆盖 2024/2025 版本!

联系我们联系我们