You are on page 1of 19

Usually, i am always using SUSE Linux Enterprise Server as operating system for Zimbra

Mail Server. But, starting from Zimbra 9.x.x, SLES has been deprecated (end of life) and
may be will not supported by Zimbra. Therefore, i attempt to using CentOS as operating
system for Zimbra. For easy understanding, this is my information system
Domain
: imanudin.net
Hostname
: mail
IP Address : 192.168.26.11

# Configure Network
First, we must configure network on CentOS. Assuming name of your network interface is
eth0
1.vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.26.11
NETMASK=255.255.255.0
DNS1=192.168.26.11
GATEWAY=192.168.26.2
DNS2=192.168.26.2
USERCTL=no

Restart network service and setup for automatic boot


1.service network restart
2.chkconfig network on

# Configure Disable Selinux & Firewall


Open file /etc/sysconfig/selinux and change SELINUX=enforcing
become SELINUX=disabled. Also disable some service such as iptables, ip6tables
and firewalld.
1.setenforce 0
2.service firewalld stop
3.service iptables stop
4.service ip6tables stop
5.systemctl disable firewalld
6.systemctl disable iptables
7.systemctl disable ip6tables

# Configure /etc/hosts, /etc/resolv.conf and hostname


Open file /etc/hosts and configure as follows
127.0.0.1

localhost

192.168.26.11 mail.imanudin.net mail

Open file /etc/resolv.conf and configure as follows


search imanudin.net
nameserver 192.168.26.11
nameserver 192.168.26.2
nameserver 8.8.8.8

Do the following command as root


1.hostname mail.imanudin.net
2.echo "HOSTNAME=mail.imanudin.net" >> /etc/sysconfig/network

# Disable service sendmail or postfix


Do the following command as root
1.service sendmail stop
2.service postfix stop
3.systemctl disable sendmail
4.systemctl disable postfix

# Update repo and install package dependency by Zimbra


1.yum update
2.yum -y install perl perl-core wget screen w3m elinks openssh-clients
openssh-server bind bind-utils unzip nmap sed nc sysstat libaio rsync
telnet aspell

# Configure local DNS Server


Zimbra needed lookup to MX records on domain that used. For that purpose, we
can configure dns server on machine of Zimbra mail server
Open file /etc/named.conf and add any on listen-on port 53 and allow-query as follows
listen-on port 53 { 127.0.0.1; any; };
allow-query
{ localhost; any; };

Create a zone on the bottom of file named.conf as follows


zone "imanudin.net" IN {
type master;
file "db.imanudin.net";
allow-update { none; };
};

Create database for new zone has been created on folder /var/named/
1.touch /var/named/db.imanudin.net
2.chgrp named /var/named/db.imanudin.net
3.vi /var/named/db.imanudin.net

fill as follows
$TTL 1D
@
IN SOA

@
@
ns1
mail

IN
IN
IN
IN

ns1.imanudin.net. root.imanudin.net. (
0
; serial
1D
; refresh
1H
; retry
1W
; expire
3H )
; minimum
NS
ns1.imanudin.net.
MX
0 mail.imanudin.net.
A
192.168.26.11
A
192.168.26.11

# Restart Service & Check results configuring DNS Server


1.service named restart
2.systemctl enable named
3.nslookup mail.imanudin.net
4.dig imanudin.net mx

If results from above command as follows, your configuration dns has been success
[root@mail opt]# nslookup mail.imanudin.net
Server:
192.168.26.11
Address:
192.168.26.11#53
Name: mail.imanudin.net
Address: 192.168.26.11

Preparation for install Zimbra has been finished. Now we can install zimbra and will
explained on next section

Good luck and hopefully useful

After previously preparation for install Zimbra has been finished, we can install
Zimbra right now. First, we can download Zimbra Binary from this link
http://www.zimbra.com/downloads/zimbra-collaboration-open-source or if you
are in Indonesia region, you can download on follows link
http://mirror.linux.or.id/zimbra/binary/.
1.
cd /opt/
2.
wget -c http://files2.zimbra.com/downloads/8.5.0_GA/zcs8.5.0_GA_3042.RHEL7_64.20140828204420.tgz

After finished download, extract Zimbra, cd to folder result of extract and install
Zimbra
1.
tar -zxvf zcs-8.5.0_GA_3042.RHEL7_64.20140828204420.tgz
2.
cd zcs-8.5.0_GA_3042.RHEL7_64.20140828204420
3.
sh install.sh
type Y if asking license agreement
Do you agree with the terms of the software license agreement? [N] Y
Select the packages to install like follows
Install
Install
Install
Install
Install
Install
Install
Install
Install
Install

zimbra-ldap [Y] Y
zimbra-logger [Y] Y
zimbra-mta [Y] Y
zimbra-dnscache [Y] N
zimbra-snmp [Y] Y
zimbra-store [Y] Y
zimbra-apache [Y] Y
zimbra-spell [Y] Y
zimbra-memcached [Y] Y
zimbra-proxy [Y] Y

Type Y if asked The system will be modified. Continue?


if get message like follows, enter or type Yes and change domain name
DNS ERROR resolving MX for mail.imanudin.net
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Yes
Create domain: [mail.imanudin.net] imanudin.net
if you not change domain name on above section, your domain name will
become mail.imanudin.net and email of account will become
user@mail.imanudin.net. Type 6 and then press key enter to change password
of admin account and type again 4 and then press key enter. Insert your
password that you want
1)
2)
3)
4)
5)
6)

Common Configuration:
zimbra-ldap:
zimbra-logger:
zimbra-mta:
zimbra-snmp:
zimbra-store:
+Create Admin User:
+Admin user to create:

Enabled
Enabled
Enabled
Enabled
Enabled
yes
admin@imanudin.net

******* +Admin Password


UNSET
+Anti-virus quarantine user:
virusquarantine.dgnsq8ewc@imanudin.net
......
......
Address unconfigured (**) items (? - help) 6
Store configuration
1) Status:
Enabled
2) Create Admin User:
yes
3) Admin user to create:
admin@imanudin.net
** 4) Admin Password
UNSET
5) Anti-virus quarantine user:
virusquarantine.dgnsq8ewc@imanudin.net
......
......
Select, or 'r' for previous menu [r] 4
Password for admin@imanudin.net (min 6 characters): [s8eNUeOms]
Verys3cr3t
After insert password, Select, or r for previous menu. If all has been
configured, apply configuration and wait a moment until zimbra finished install
*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes] Yes
Save config in file: [/opt/zimbra/config.24648]
Saving config in /opt/zimbra/config.24648...done.
The system will be modified - continue? [No] Yes
Operations logged to /tmp/zmsetup10052014-214606.log
Type Yes if asked Notify Zimbra of your installation? and if has been appear
Configuration complete press return to exit, your zimbra installation has been
finished. Check Zimbra status with this command su zimbra -c zmcontrol
status and make sure all service running well. You can also trying access
webmail via browser on url https://ZimbraServer
su - zimbra
zmcontrol status
zmprov -l gaaa
zmprov -l gaa imanudin.net
zmmailbox -z -m admin@imanudin.net search -l 100 "in:Inbox"
zmmailbox -z -m admin@imanudin.net ef "/Inbox/"
zmprov ca rinti@imanudin.net rinti1012
zmprov ca livia@imanudin.net livia1012
zmmailbox -z -m livia@imanudin.net search -l 100 "in:Inbox"
admin@imanudin.net rinti

1012Livia
https://192.168.1.51:7071/zimbraAdmin/

How To Configure Online Failover/Failback on CentOS 6 Using


Heartbeat
Home Linux How To Configure Online Failover/Failback on CentOS 6 Using
Heartbeat
March 18, 2015 iman Linux 14 Comments
This article will explain how to configuration failover/failback using Heartbeat
application. According this article : http://linux-ha.org/wiki/Heartbeat
Heartbeat is a daemon that provides cluster infrastructure (communication and
membership) services to its clients. This allows clients to know about the
presence (or disappearance!) of peer processes on other machines and to
easily exchange messages with them.
In this guidance, i am build 2 system for online failover. The systems using
CentOS 6 64 Bit. For easy understanding, this is my information system
# Server 1
Hostname
: node1
Domain
: imanudin.net
IP Address : 192.168.80.91
# Server 2
Hostname
: node2
Domain
: imanudin.net
IP Address : 192.168.80.92
# Alias IP for online failover testing
IP Address : 192.168.80.93

# Configure Network
First, we must configure network on CentOS. Assuming name of your network
interface is eth0. Do the following configuration on all nodes (node1 and
node2) and adjust on node2
1.vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.80.91
NETMASK=255.255.255.0
DNS1=192.168.80.91
GATEWAY=192.168.80.11
DNS2=192.168.80.11
DNS3=8.8.8.8
USERCTL=no

Restart network service and setup for automatic boot on all nodes (node1 and
node2)
1.service network restart
2.chkconfig network on

# Configure Disable Selinux & Firewall on all nodes (node1 and node2)

Open file /etc/sysconfig/selinux and change SELINUX=enforcing


become SELINUX=disabled. Also disable some service such as iptables and
ip6tables.
1.setenforce 0
2.service iptables stop
3.service ip6tables stop
4.chkconfig iptables off
5.chkconfig ip6tables off

# Configure /etc/hosts and hostname on all nodes (node1 and node2)


Open file /etc/hosts and configure as follows
# node1
127.0.0.1
localhost
192.168.80.91 node1.imanudin.net node1
192.168.80.92 node2.imanudin.net node2
# node2
127.0.0.1
localhost
192.168.80.91 node1.imanudin.net node1
192.168.80.92 node2.imanudin.net node2

Do the following command as root and open file /etc/sysconfig/network to


change hostname
On node1
1.hostname node1.imanudin.net
2.vi /etc/sysconfig/network

Change HOSTNAME so that like below :


NETWORKING=yes
HOSTNAME=node1.imanudin.net

On node2

1.hostname node2.imanudin.net
2.vi /etc/sysconfig/network

Change HOSTNAME so that like below :


NETWORKING=yes
HOSTNAME=node2.imanudin.net

# Update repos and install packages Heartbeat on all nodes (node1 and node2)
1.yum update
2.yum install epel-release
3.yum -y install heartbeat

If you cannot get epel repo, please use this repo and
install : http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-68.noarch.rpm
# Configure Heartbeat
Create a file /etc/ha.d/ha.cf (enough on node1 only)
1.vi /etc/ha.d/ha.cf

fill with the following line


keepalive 2
warntime 5
deadtime 15
initdead 90
udpport 694
auto_failback on
ucast eth0 192.168.80.92
logfile /var/log/ha-log
node node1.imanudin.net node2.imanudin.net

Note :

eth0 is interface on your system. If your system using eth1 for interface name,
please change eth0 to the eth1. 192.168.80.92 is IP Address of node2
Create a file /etc/ha.d/authkeys (enough on node1 only)
1.vi /etc/ha.d/authkeys

fill with the following line


auth 2
2 crc

change permission authkeys


view sourceprint?

1.chmod 0600 /etc/ha.d/authkeys

Create a file /etc/ha.d/haresources (enough on node1 only)


view sourceprint?
1.vi /etc/ha.d/haresources

fill with the following line

node1.imanudin.net IPaddr::192.168.80.93/24/eth0:0

Note :
node1.imanudin.net will become as a master server. 192.168.80.93 is an alias
IP for testing online/failover
# Copy those files from node1 to node2 (run the following command on node1)
view sourceprint?
1.cd /etc/ha.d/
2.scp authkeys ha.cf haresources root@192.168.80.92:/etc/ha.d/

# Change ha.cf file on node2 (run the following command on node2)


view sourceprint?
1.vi /etc/ha.d/ha.cf

change line ucast eth0 192.168.80.92 so that become


ucast eth0 192.168.80.91

192.168.80.91 is IP Address of node1


# Start service Heartbeat and configure for automatic startup at boot on all
nodes (node1 and node2)
view sourceprint?
1.service heartbeat start
2.chkconfig heartbeat on

TESTING ONLINE FAILOVER/FAILBACK


After your start service heartbeat on all nodes, you will see an alias IP on
node1. Please check with command ifconfig. For testing failover, please stop
service heartbeat on node1 (service heartbeat stop). Please check your IP on
node2 with command ifconfig. You will see an alias IP on node2 (an alias IP that
has been taken by node2). For testing failback, please start again service
heartbeat on node1 (service heartbeat start). An alias IP will automatically
taken by node1.
TESTING WITH APACHE WEB SERVER
Please install Apache on all nodes
view sourceprint?
1.yum install httpd

Create an index.html on DocumentRoot node1


view sourceprint?
1.vi /var/www/html/index.html

Fill with the following example


This is node1

Save and restart service Apache


view sourceprint?

1.service httpd restart

Please try to access node1 via browser. You will see a text This is node1
Create an index.html on DocumentRoot node2
view sourceprint?
1.vi /var/www/html/index.html

Fill with the following example


This is node2

Save and restart service Apache


view sourceprint?
1.service httpd restart

Please try to access node2 via browser. You will see a text This is node2
Integrate Apache with Heartbeat
Please change file /etc/ha.d/haresources on all nodes
view sourceprint?
1.vi /etc/ha.d/haresources

so that like below :

node1.imanudin.net IPaddr::192.168.80.93/24/eth0:0 httpd

Stop service Apache and configure automatic off at boot on all nodes (Service
Apache will be handled by Heartbeat)
view sourceprint?
1.service httpd stop
2.chkconfig httpd off

Please try to access an alias IP from browser. You will see a text This is node1.
Please try to stop Heartbeat service on node1 and refresh browser. You will see
a text This is node2 (all services handled by Heartbeat on node1 will be taken
by node2). For failback, please start again Heartbeat service on node1 (all
services handled by Heartbeat on node2 will be taken again by node1)
You could also experiment with other services for online failover such
as Samba, MySQL, MariaDB etc. The Heartbeat application only configure
failover/failback, not data synchronize.
Good luck and hopefully useful

How To Configure Data Replication/Synchronize on CentOS 6 Using DRBD


Home Linux How To Configure Data Replication/Synchronize on CentOS 6
Using DRBD
March 22, 2015 iman Linux 15 Comments
This article will explain how to configure data replication/synchronize using
DRBD application. According this article : http://drbd.linbit.com/
DRBD refers to block devices designed as a building block to form high
availability (HA) clusters. This is done by mirroring a whole block device via an
assigned network. DRBD can be understood as network based raid-1.
For configure DRBD, we should have at least 2 machines and have 2 harddrive
on each machines. One harddrive will be configured as OS system and one
harddrive will be configured as harddrive for replication with other harddrive on
other machine

In this guidance, i am build 2 systems for replication. The systems using


CentOS 6 64 Bit. For easy understanding, this is my information system
# Server 1
Hostname
: node1
Domain
: imanudin.net
IP Address : 192.168.80.91
# Server 2
Hostname
: node2
Domain
: imanudin.net
IP Address : 192.168.80.92
# Second Harddrive 1 GB on each machines for testing Purpose

# Configure Network

First, we must configure network on CentOS. Assuming name of your network


interface is eth0. Do the following configuration on all nodes (node1 and
node2) and adjust on node2
1.vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.80.91
NETMASK=255.255.255.0
DNS1=192.168.80.91
GATEWAY=192.168.80.11
DNS2=192.168.80.11
DNS3=8.8.8.8
USERCTL=no

Restart network service and setup for automatic boot on all nodes (node1 and
node2)
1.service network restart
2.chkconfig network on

# Configure Disable Selinux & Firewall on all nodes (node1 and node2)
Open file /etc/sysconfig/selinux and change SELINUX=enforcing
become SELINUX=disabled. Also disable some service such as iptables and
ip6tables.
1.setenforce 0
2.service iptables stop
3.service ip6tables stop
4.chkconfig iptables off
5.chkconfig ip6tables off

# Configure /etc/hosts and hostname on all nodes (node1 and node2)


Open file /etc/hosts and configure as follows on all nodes (node1 and node2)
127.0.0.1
localhost
192.168.80.91 node1.imanudin.net node1
192.168.80.92 node2.imanudin.net node2

Do the following command as root and open file /etc/sysconfig/network to


change hostname
On node1
1.hostname node1.imanudin.net
2.vi /etc/sysconfig/network

Change HOSTNAME so that like below :


NETWORKING=yes
HOSTNAME=node1.imanudin.net

On node2

1.hostname node2.imanudin.net
2.vi /etc/sysconfig/network

Change HOSTNAME so that like below :


NETWORKING=yes
HOSTNAME=node2.imanudin.net

# Update repos and install packages DRBD on all nodes (node1 and node2)
1.wget http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
2.rpm -ivh elrepo-release-6-6.el6.elrepo.noarch.rpm
3.yum update
4.yum install kmod-drbd83 drbd83-utils

# Configure DRBD
Configure file /etc/drbd.conf (enough on node1 only)

1.vi /etc/drbd.conf

fill with the following line

global {
dialog-refresh 1;
usage-count yes;
minor-count 5;
}
common {
syncer {
rate 10M;
}
}
resource r0 {
startup {
wfc-timeout 30;
outdated-wfc-timeout 20;
degr-wfc-timeout 120;
}
protocol C;
disk {
on-io-error detach;
}
syncer {
rate 10M;
al-extents 257;
}
on node1.imanudin.net {
device /dev/drbd0;
address 192.168.80.91:7788;
meta-disk internal;
disk /dev/sdb;
}
on node2.imanudin.net {
device /dev/drbd0;
address 192.168.80.92:7788;
meta-disk internal;
disk /dev/sdb;
}
}

Note :
r0 is resources name for DRBD.
/dev/sdb is second drive on each machines that will configured for
DRBD. Please check with fdisk -l command to make sure the name of second
drive. Recommended capacity harddrive on each machines are same. If
different, the bigger harddrive will adjust with the lower harddrive.
Recommended using 2 NIC for each machines. 1 NIC for communication with
clients and 1 NIC for communication between servers using Cross cable (DRBD
communication)
# Copy drbd.conf from node1 to node2 (run the following command on node1)
1.scp /etc/drbd.conf root@node2:/etc/drbd.conf

# Create metadata on all nodes (node1 and node2)


Run the following command
1.drbdadm create-md r0

# Start DRBD services on all nodes (node1 and node2)


Run the following command

1.service drbd start


2.chkconfig drbd on

# Check DRBD status all nodes (node1 and node2)


1.service drbd status

# Configure primary DRBD on node1


Run the following command only at node1
1.drbdsetup /dev/drbd0 primary --overwrite-data-of-peer

Please wait until 100% synchronize devices among node1 and node2. You also
could check the progress with the following command
1.service drbd status
2.watch service drbd status

After finish synchronization, you will see Connected and UpToDate among
node1 and node2
drbd driver loaded OK; device status:
version: 8.4.5 (api:1/proto:86-101)
GIT-hash: 1d360bde0e095d495786eaeb2a1ac76888e4db96 build by
phil@Build64R6, 2014-10-28 10:32:53
m:res cs ro ds p mounted fstype
0:r0 Connected Primary/Secondary UpToDate/UpToDate C

# Format device DRBD


In this section, i am using ext3. You can using other format such as xfs, ext4
and other
1.mkfs.ext3 /dev/drbd0

Hooray, finally DRBD has been finished configured and connected each other
Good luck and hopefully useful

Testing Data Replication/Synchronize on DRBD


Home Linux Testing Data Replication/Synchronize on DRBD
March 23, 2015 iman Linux No Comments
After configuration DRBD in the previous article, we must test first for ensure whether
DRBD has been working properly or not. This is some testing to ensure DRBD has been
worked
# TESTING ON NODE1
Create folder tmp in /mnt folder
1.mkdir /mnt/tmp

Mount DRBD devices into tmp folder who has been created
1.mount /dev/drbd0 /mnt/tmp

Create file/folder into tmp folder

1.touch /mnt/tmp/created-on-node1.txt

Please check whether file created-on-node1.txt has been there


1.ls /mnt/tmp/

For testing/check on node2, umount DRBD devices and demoting into secondary
1.umount /dev/drbd0
2.drbdadm secondary r0

Make sure DRBD has been demoted into Secondary


1.service drbd status

# TESTING ON NODE2
Create folder tmp in /mnt folder
1.mkdir /mnt/tmp

Promoting DRBD into Primary


1.drbdadm primary r0

Mount DRBD devices into tmp folder who has been created
1.mount /dev/drbd0 /mnt/tmp

Please check whether file created-on-node1.txt has been there too


1.ls /mnt/tmp/

If the file has been there, its meant DRBD has been replicated
Umount DRBD devices, demoting again into secondary and promoting node1 into
primary
1.umount /dev/drbd0
2.drbdadm secondary r0
3.service drbd status

# PROMOTING NODE1 INTO PRIMARY


run the following command on node1
1.service drbd status
2.drbdadm primary r0

Good luck and hopefully useful

How To Install & Configure Zimbra High Availability (HA)


Home Zimbra How To Install & Configure Zimbra High Availability (HA)
In the previous articles, ive been explain how to install and configure Zimbra
on CentOS 6 or CentOS 7, how to install and configure online failover/failback
on CentOS 6 using Heartbeat and how to install and configure data replication
on CentOS 6 using DRBD. All above guidance could be combined to get Zimbra
High Availability. For online failover/failback, you could using Heartbeat. For
data replication, you could using DRBD. Heartbeat + DRBD will produce High
Availability (HA). The following is guidance to configure Zimbra HA
Step by step to configure Zimbra HA
For the Linux systems, i am using CentOS 6 64 Bit. For easy understanding, this
is my information system
# Server 1
Hostname
: node1
Domain
: imanudin.net
IP Address : 192.168.80.91
# Server 2
Hostname
: node2
Domain
: imanudin.net
IP Address : 192.168.80.92
# Alias IP
Hostname
: mail
Domain
: imanudin.net
IP Address : 192.168.80.93

Alias IP will be used for access clients/users. This alias IP will be configured
online failover

# install Zimbra on CentOS 6 on all nodes (node1 and node2) as described at


this link : How To Install Zimbra 8.6 on CentOS 6. Please note some information
below
Please change name of each nodes refers into mail.imanudin.net when
installing Zimbra
Set IP address of each nodes refers into mail.imanudin.net include DNS and
/etc/hosts
# Stop Zimbra and DNS services on all nodes (node1 and node2)
view sourceprint?
1.su - zimbra -c "zmcontrol stop"
2.service named stop
3.chkconfig zimbra off
4.chkconfig named off

# After installed Zimbra, install and configure Heartbeat on all nodes (node1
and node2) as described at this link : How To Configure Online Failover/Failback
on CentOS 6 Using Heartbeat
# After installed Heartbeat and online failover/failback working fine, then install
DRBD for data replication on all nodes (node1 and node2) as described at this
link : How To Configure Data Replication/Synchronize on CentOS 6 Using DRBD
# Testing data replication DRBD that has been worked : Testing Data
Replication/Synchronize on DRBD
# After DRBD has been worked, copy file/folder /opt/zimbra into DRBD
devices.
Do the following command only at node1
Rysnc Zimbra
1.drbdadm primary r0
2.mount /dev/drbd0 /mnt/tmp
3.rsync -avP --exclude=data.mdb /opt/ /mnt/tmp

data.mdb will be huge if copied by rsync so that take a long time. For the
tricks, use cp for copy data.mdb to DRBD devices
Copy data.mdb

1.cp
/opt/zimbra/data/ldap/mdb/db/data.mdb /mnt/tmp/zimbra/data/ldap/mdb/db/da
ta.mdb
2.chown zimbra.zimbra /mnt/tmp/zimbra/data/ldap/mdb/db/data.mdb

# Umount DRBD devices after rsync file/folder Zimbra at node1


1.umount /dev/drbd0

# Move folder /opt existing to another folder, do the following command on all
nodes (node1 and node2)
1.mv /opt /backupopt
2.mkdir /opt

# Configure /etc/hosts and dns records on all nodes (node1 and node2)
1.vi /etc/hosts

so that like below

127.0.0.1
localhost
192.168.80.91
node1.imanudin.net
192.168.80.92
node2.imanudin.net
192.168.80.93
mail.imanudin.net
1.vi /var/named/db.imanudin.net

node1
node2
mail

change IP address of mail so that refers into IP 192.168.80.93. See the


following example

$TTL 1D
@
IN SOA

@
@
ns1
mail

IN
IN
IN
IN

ns1.imanudin.net. root.imanudin.net. (
0
; serial
1D
; refresh
1H
; retry
1W
; expire
3H )
; minimum
NS
ns1.imanudin.net.
MX
0 mail.imanudin.net.
A
192.168.80.91
A
192.168.80.93

# Configure file /etc/ha.d/haresources on all nodes (node1 and node2)


1.vi /etc/ha.d/haresources

so that like below

node1.imanudin.net IPaddr::192.168.80.93/24/eth0:0 drbddisk::r0


Filesystem::/dev/drbd0::/opt::ext3 named zimbra

# Stop service Heartbeat on node2 and then node1


1.service heartbeat stop

# Start service Heartbeat on node1 and then node2


1.service heartbeat start

TESTING HA
Failover
After Zimbra running well on node1, please stop service Heartbeat on node1 or
force off machine
1.service heartbeat stop

All services that taken over by Heartbeat will automatically stopped and taken
over by node2. How long node2 can start all services worked again, depends
how long start services (named and zimbra)
Failback
Please start again service Heartbeat on node1 or power on machine
1.service heartbeat start

All running services on node2 will automatically stopped and taken over by
node1
Hooray, finally you could build Zimbra HA with DRBD+Heartbeat
For log information about HA process, you can see at /var/log/ha-log
Good luck and hopefully useful