Skip to content

Instantly share code, notes, and snippets.

@kenshinx
Last active January 2, 2016 13:49
Show Gist options
  • Select an option

  • Save kenshinx/8312401 to your computer and use it in GitHub Desktop.

Select an option

Save kenshinx/8312401 to your computer and use it in GitHub Desktop.

Revisions

  1. kenshinx revised this gist Jan 15, 2014. 2 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
  2. kenshinx revised this gist Jan 10, 2014. 2 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
  3. kenshinx created this gist Jan 8, 2014.
    26 changes: 26 additions & 0 deletions keepalived.backup.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    ! Configuration File for keepalived
    2
    3 global_defs {
    4 notification_email {
    5 kenshin@staff.sina.com.cn
    6 }
    7 notification_email_from sec@staff.sina.com.cn
    8 smtp_server mail.sina.com.cn
    9 smtp_connect_timeout 30
    10 router_id LVS_DEVEL_252
    11 }
    12
    13 vrrp_instance VI_1 {
    14 state BACKUP
    15 interface eth0
    16 virtual_router_id 21
    17 priority 98
    18 advert_int 1
    19 authentication {
    20 auth_type PASS
    21 auth_pass sinasec
    22 }
    23 virtual_ipaddress {
    24 172.16.140.250
    25 }
    26 }
    26 changes: 26 additions & 0 deletions keepalived.master.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    ! Configuration File for keepalived

    global_defs {
    notification_email {
    kenshin@staff.sina.com.cn
    }
    notification_email_from sec@staff.sina.com.cn
    smtp_server mail.sina.com.cn
    smtp_connect_timeout 30
    router_id LVS_DEVEL_249
    }

    vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 21
    priority 100
    advert_int 1 #interval
    authentication {
    auth_type PASS
    auth_pass sinasec
    }
    virtual_ipaddress {
    172.16.140.250
    }
    }