Created
March 14, 2018 18:58
-
-
Save davidc0le/bb027d569d0d23857bdc5828e4fca526 to your computer and use it in GitHub Desktop.
keepalived example configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global_defs { | |
notification_email { | |
[email protected] | |
} | |
notification_email_from [email protected] | |
smtp_server localhost | |
smtp_connect_timeout 30 | |
} | |
vrrp_instance portal { | |
state master | |
interface eth0 | |
# the virtual router id must be unique to each vrrp instance that you define | |
virtual_router_id 41 | |
# set the value of priority higher on the master server than on a backup server | |
priority 200 | |
advert_int 1 | |
authentication { | |
auth_type pass | |
auth_pass 1066 | |
} | |
virtual_ipaddress { | |
10.64.19.240/24 | |
} | |
} | |
vrrp_instance database { | |
state backup | |
interface eth0 | |
# the virtual router id must be unique to each vrrp instance that you define | |
virtual_router_id 42 | |
# set the value of priority higher on the master server than on a backup server | |
priority 100 | |
advert_int 1 | |
authentication { | |
auth_type pass | |
auth_pass 1066 | |
} | |
virtual_ipaddress { | |
10.64.19.241/24 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global_defs { | |
notification_email { | |
[email protected] | |
} | |
notification_email_from [email protected] | |
smtp_server localhost | |
smtp_connect_timeout 30 | |
} | |
vrrp_instance portal { | |
state backup | |
interface eth0 | |
# the virtual router id must be unique to each vrrp instance that you define | |
virtual_router_id 41 | |
# set the value of priority higher on the master server than on a backup server | |
priority 100 | |
advert_int 1 | |
authentication { | |
auth_type pass | |
auth_pass 1066 | |
} | |
virtual_ipaddress { | |
10.64.19.240/24 | |
} | |
} | |
vrrp_instance database { | |
state master | |
interface eth0 | |
# the virtual router id must be unique to each vrrp instance that you define | |
virtual_router_id 42 | |
# set the value of priority higher on the master server than on a backup server | |
priority 200 | |
advert_int 1 | |
authentication { | |
auth_type pass | |
auth_pass 1066 | |
} | |
virtual_ipaddress { | |
10.64.19.241/24 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment