zoukankan      html  css  js  c++  java
  • keepalived双主配置

    主机配置

    global_defs {
    notification_email {
    56375@qq.com
    }
    # notification_email_from Alexandre.Cassen@firewall.loc
    # smtp_server 192.168.200.1
    # smtp_connect_timeout 30
    router_id node1
    # vrrp_skip_check_adv_addr
    # vrrp_strict
    # vrrp_garp_interval 0
    # vrrp_gna_interval 0
    }
    vrrp_script chk_httpd_port {
    script "</dev/tcp/127.0.0.1/80"
    interval 2
    weight 2
    }
    vrrp_instance VI_1 {
    state MASTER
    interface ens160
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
    auth_type PASS
    auth_pass 1111
    }
    virtual_ipaddress {
    192.168.1.174
    }
    track_script {
    chk_httpd_port
    }
    }

    vrrp_instance VI_2 {
    state BACKUP
    interface ens160
    virtual_router_id 52
    priority 99
    advert_int 1
    authentication {
    auth_type PASS
    auth_pass 1111
    }
    virtual_ipaddress {
    192.168.1.178
    }
    track_script {
    chk_httpd_port
    }
    }

    备机配置

    global_defs {
    notification_email {
    576@qq.com
    }
    # notification_email_from Alexandre.Cassen@firewall.loc
    # smtp_server 192.168.200.1
    # smtp_connect_timeout 30
    router_id node2
    # vrrp_skip_check_adv_addr
    # vrrp_strict
    # vrrp_garp_interval 0
    # vrrp_gna_interval 0
    }
    vrrp_script chk_httpd_port {
    script "</dev/tcp/127.0.0.1/80"
    interval 2
    weight 2
    }
    vrrp_instance VI_1 {
    state BACKUP
    interface ens160
    virtual_router_id 51
    priority 99
    advert_int 1
    authentication {
    auth_type PASS
    auth_pass 1111
    }
    virtual_ipaddress {
    192.168.1.174
    }
    track_script {
    chk_httpd_port
    }
    }


    vrrp_instance VI_2 {
    state MASTER
    interface ens160
    virtual_router_id 52
    priority 100
    advert_int 1
    authentication {
    auth_type PASS
    auth_pass 1111
    }
    virtual_ipaddress {
    192.168.1.178
    }
    track_script {
    chk_httpd_port
    }
    }

  • 相关阅读:
    https://www.cnblogs.com/aademeng/category/1042475.html
    python中重要的模块--asyncio 转载
    await这个关键词以及asyncio.wait asyncio.gather
    async get_event_loop
    麦克米伦7000
    [GO]errorr接口的使用
    [GO]断言
    [GO]空接口
    [GO]接口的转换
    [GO]接口的嵌用继承
  • 原文地址:https://www.cnblogs.com/tiantianhappy/p/12048171.html
Copyright © 2011-2022 走看看