Lab environment
Server Mail Proxy 01
IP: 192.168.10.10
VIP: 192.168.30.30
DNS Name: proxy01.huuphan.com
zimbra_server_hostname: mail.huuphan.com
Server Mail Proxy 02
IP: 192.168.20.20
VIP: 192.168.30.30
DNS Name: proxy02.huuphan.com
zimbra_server_hostname: mail.huuphan.com
Step 1: To instal keepalived
#yum update -y
#yum install -y keepalived
Step 2: To configure keepalived
To refer install and configure keepalived
Zimbra proxy01 Master Server
global_defs {
notification_email {
[email protected]
}
notification_email_from [email protected]
smtp_server mbx.huuphan.com # mbx.huuphan.com mailstore
smtp_connect_timeout 30
}
vrrp_script chk_nginx_service {
script "killall -0 nginx"
interval 3
}
vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 51
priority 101
advert_int 1
#No Failback
nopreempt
#send an alert email
smtp_alert
vrrp_unicast_bind 192.168.10.10
vrrp_unicast_peer 192.168.20.20
virtual_ipaddress {
192.168.30.30 dev eth0 label Zimbra_VIP
}
authentication {
auth_type PASS
auth_pass MY_SECURE_PASSWORD
}
track_script {
chk_nginx_service
}
}
Zimbra proxy02 Backup Server
global_defs {
notification_email {
[email protected]
}
notification_email_from [email protected]
smtp_server mbx.huuphan.com # mbx.huuphan.com mailstore
smtp_connect_timeout 30
}
vrrp_script chk_nginx_service {
script "killall -0 nginx"
interval 3
}
vrrp_instance VI_1 {
interface eth0
state BACKUP
priority 100
virtual_router_id 51
advert_int 1
#No Failback
nopreempt
#send an alert email
smtp_alert
vrrp_unicast_bind 192.168.20.20
vrrp_unicast_peer 192.168.10.10
virtual_ipaddress {
192.168.30.30
}
authentication {
auth_type PASS
auth_pass MY_SECURE_PASSWORD
}
track_script {
chk_nginx_service
}
}
Step 3: To enable service keepalived at system startup
#chkconfig keepalived on
#service keepalived start
Step 4: Testing & Validation zimbra proxy HA
Kill service nginx from zimbra proxy01 master server.#killall nginxTo check /var/log/messages
#tailf /var/log/messages
Thanks for reading How to install and configure zimbra proxy HA My blog Zimbra Mail Server,linux,bash script,centos,linux command I hope this is useful.