zoukankan      html  css  js  c++  java
  • mysql 主主+ Keepalived 高可用

    是在mysql互为主从的基础上做的

    yum -y install keepalived    #两台机器上都装

    配置Keepalived主从,

    vrrp_instance VI_1 {
    state MASTER    # 标记,    从为SLAVE
    interface eth0     # 网络接口
    virtual_router_id 51   #  主从必须一致
    priority 100      # 优先级 , 主要高于从
    advert_int 1
    authentication {
    auth_type PASS
    auth_pass 1111
    }
    virtual_ipaddress {
    192.168.1.199    # 虚拟VIP 可以设置多个,一行一个

    virtual_server 192.168.1.199 3306 {      #虚拟VIP 及 端口
    delay_loop 2
    #lb_algo wrr        #没有配置lvs可以不要
    #lb_kind DR                         #没有配置lvs可以不要
    #nat_mask 255.255.255.0   #没有配置lvs可以不要
    #persistence_timeout 50     #没有配置lvs可以不要
    protocol TCP         #监听的协议
    real_server 192.168.1.99 3306 {        #真实服务器组及端口
    weight 3          
    TCP_CHECK {
    connect_timeout 10           # 
    nb_get_retry 3
    connect_port 3306
    delay_before_retry 3
    }
    }
    real_server 192.168.1.105 3306 {
    weight 3
    TCP_CHECK {
    connect_timeout 10
    nb_get_retry 3
    connect_port 3306
    delay_before_retry 3
    }
    }
    }

  • 相关阅读:
    巡风安装笔记
    泛微ecology OA系统某接口存在数据库配置信息泄露漏洞
    Apache Solr Velocity模板远程代码执行复现
    泛微OA系统多版本存在命令执行漏洞
    各种浏览器UA值
    使用python合并excel
    疑难杂症----udf提权无法导出.dll
    疑难杂症----windows7
    Nmap的使用
    Sqlmap的使用
  • 原文地址:https://www.cnblogs.com/haoge92/p/9371401.html
Copyright © 2011-2022 走看看