Life in code, apps and OS's

Install Zimbra & Bind on Ubuntu 6.06

Posted on: August 4, 2007

In this tutorial I will be explaining with simple to follow steps how to install the Zimbra Collaboration Suite onto a Ubuntu 6.06 server with a locally running DNS Server (BIND).

For this tutorial you will need to obtain the Ubuntu Server edtion CD rom from http://www.ubuntu.com

Once you have downloaded the CD and burn it to CR-ROM you will need to boot the server from it and install it with all the default options. Obviousy you can customise the keyboard layout and location settings as required.

Once you have installed the base system make sure that you set the root users password..

sudo passwd root

You will then need to enter the password you used during setup and then enter the new password for the root user account and then confirm it.

The next required step is to install SSH so that you can administer and install the rest of the server remotely using an SSH client such as PuTTY.

apt-get install ssh openssh-server

The next step that we want to do is to set a static IP address on the server to do this we need to edit the NIC settings to do this type:

vi /etc/network/interfaces

and then ammend the file to look as follows, you will obviously need to make it suit your network settings such as default gateway, IP address etc.

# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback network interfaceauto lo

iface lo inet loopback

# The primary network interface

auto eth0

iface eth0 inet static

address 192.168.0.110

netmask 255.255.255.0

network 192.168.0.0

broadcast 192.168.0.255

gateway 192.168.0.1

Next you will need to restart the NIC to enable the changes.

/etc/init.d/networking restart

The next step is to add the hostname to the systems hostname file to open the file type the following:

vi /etc/hosts

Then add your server hostname as like follows:

127.0.0.1       localhost.localdomain    localhost192.168.0.110   mail.example.com      mail# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

ff02::3 ip6-allhosts

Afterwards type the following command in:

echo mail.example.com > /etc/hostname

Now you will need to restart the server to do this type the following command:

shutdown -r now

Once the server is back online, log in as the root user again and check that the hostname after issueing both of the following commands are both ‘mail.example.com’

hostname
hostname -f

The next stage is to disable the package manager from installing packages from the CD-ROM so basically we need to disable it from the /apt/sources.list file. So to do this we need to issue the following command:-

vi /etc/apt/sources.list

Basically you will need to comment the following line to disable the CD from being used.

[...]#deb cdrom:[Ubuntu-Server 6.06 _Dapper Drake_ - Release i386 (20060531)]/ dapper main restricted

[...]

Also you will need to enable the universe mirror and security mirrors by uncommenting them. (which appear further down the page)

Next to update the server so it has the latest package updates etc. we will need to issue these commands:

apt-get update

apt-get upgrade (This will take several mins as it downloads the latest package updates approx 40MB)

Once you have fully updated your Ubuntu server you will then need to install some additional packages that Zimbra requires, to do this issue the following command at the command prompt…

apt-get install libidn11 curl fetchmail libpcre3 libgmp3c2 libexpat1 libxml2 libtie-ixhash-perl perl expat

Now after those packages have been downloaded and installed on your server the next step is to download and install BIND (A Linux/Unix DNS Server) – We will be setting this up locally so that we can run the server standalone without requiring another server on your network for DNS. So now enter the following command…

apt-get install bind

After BIND has been downloaded and installed we now have to configure it for our needs. Now what we do is we are going to split the DNS, You will need to edit /etc/bind/named.conf.options

Uncomment the following and change to reflect your own upstream DNS servers. In my case I am using my ADSL router, adjust yours accordingly.

 // forwarders {//      0.0.0.0;

// };

Mine now looks like this:

 forwarders {      192.168.0.254;

};

Hoever you can add more than one DNS server for external addresses, For example you could also use an external DNS servers provided by your ISP… here is an example:

forwarders {69.145.248.50; 69.145.232.4;

};

Next what we have to do is edit the following file and insert the core infomation about the local DNS server. The file that you will need to ammend is as follows: /etc/bind/named.conf.local

	// We are the master server for mail.example.com zone "mail.example.com" {

type master;

file "db.mail.example.com";

};

After you have added the above infomation and saved the file we now need to create the zone file to do this type the following:

vi /var/cache/bind/db.mail.example.com

Now make the contents of the file look as follows:-

;;       Addresses and other host information.

;

@       IN      SOA     mail.example.com. hostmaster.mail.example.com. (

10118      ; Serial

43200      ; Refresh

3600       ; Retry

3600000    ; Expire

2592000 )  ; Minimum

;       Define the nameservers and the mail servers

IN      NS      xxx.xxx.xxx.xxx <- YOUR SERVER IP eg. 192.168.0.101

IN      A       xxx.xxx.xxx.xxx <- YOUR SERVER IP eg. 192.168.0.101

IN      MX      10 mail.example.com.

Now that we have setup the Local DNS server we need to change the server’s DNS lookup to point to the phyical server so now we need to edit the following file: /etc/resolv.conf

Then add the following line (above any exsisting name servers):

nameserver xxx.xxx.xxx.xxx

Obviously you will need to replace the xxx.xxx.xxx.xxx with your server’s IP address in my case it is:

nameserver 192.168.0.101

Now we are ready to restart the DNS server and test if all is now working, to do this issue the following command at the console:

/etc/init.d/bind reload

Now to test it, type the following:-

nslookup mail.example.com

The resault should show as your server’s IP address in my case the resault was:

192.168.0.101

Now were ready to start the download and installation process of the Zimbra Collaboration Suite server.

So now lets change the working directory to save the download of Zimbra to, Lets issue the following command…

cd /usr/src

Now we are going to download Zimbra from SourceForge, type the following command (This will download version 4.5.6 – The latest version at the time of writing this tutorial.)

wget http://kent.dl.sourceforge.net/sourceforge/zimbra/zcs-4.5.6_GA_1044.UBUNTU6.tgz

After it has been downloaded we now want to extract Zimbra so we can begin the install…

tar xvfz zcs-4.5.6_GA_1044.UBUNTU6.tgz

Great, Now we are ready to begin the install process, lets change to the extracted directory and initialse the installation process:-

cd zcs/
./install.sh

The installer should now look like this; It will also ask you some questons, you will need to answer them as follows…

Operations logged to /tmp/install.log.4416
Checking for existing installation…
zimbra-ldap…NOT FOUND
zimbra-logger…NOT FOUND
zimbra-mta…NOT FOUND
zimbra-snmp…NOT FOUND
zimbra-store…NOT FOUND
zimbra-apache…NOT FOUND
zimbra-spell…NOT FOUND
zimbra-core…NOT FOUND

PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZIMBRA, INC. (“ZIMBRA”) WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.

License Terms for the Zimbra Collaboration Suite:
http://www.zimbra.com/license/collaboration_suite_collective_license_1.0.html

Press Return to continue <– <ENTER>

Install zimbra-ldap [Y] <– <ENTER>

Install zimbra-logger [Y] <– <ENTER>

Install zimbra-mta [Y] <– <ENTER>

Install zimbra-snmp [Y] <– <ENTER>

Install zimbra-store [Y] <– <ENTER>

Install zimbra-spell [Y] <– <ENTER>

The system will be modified. Continue? [N] <– y

Main menu

1) Hostname: mail.example.com
2) Ldap master host: mail.example.com
3) Ldap port: 389
4) Ldap password: set
5) zimbra-ldap: Enabled
6) zimbra-store: Enabled
+Create Admin User: yes
+Admin user to create: admin@mail.example.com
******* +Admin Password UNSET
+Enable automated spam training: yes
+Spam training user: spam.tukjrdnaco@mail.example.com
+Non-spam(Ham) training user: ham.rg8fvq6cd4@mail.example.com
+Global Documents Account: wiki@mail.example.com
+SMTP host: mail.example.com
+Web server HTTP port: 80
+Web server HTTPS port: 443
+Web server mode: http
+Enable POP/IMAP proxy: no
+IMAP server port: 143
+IMAP server SSL port: 993
+POP server port: 110
+POP server SSL port: 995
+Use spell check server: yes
+Spell server URL: http://mail.example.com:7780/aspell.php

7) zimbra-mta: Enabled
8) zimbra-snmp: Enabled
9) zimbra-logger: Enabled
10) zimbra-spell: Enabled
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit

Address unconfigured (**) items (? – help) <– 6

Store configuration

1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@mail.example.com
** 4) Admin Password UNSET
5) Enable automated spam training: yes
6) Spam training user: spam.tukjrdnaco@mail.example.com
7) Non-spam(Ham) training user: ham.rg8fvq6cd4@mail.example.com
8) Global Documents Account: wiki@mail.example.com
9) SMTP host: mail.example.com
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: http
13) Enable POP/IMAP proxy: no
14) IMAP server port: 143
15) IMAP server SSL port: 993
16) POP server port: 110
17) POP server SSL port: 995
18) Use spell check server: yes
19) Spell server URL: http://mail.example.com:7780/aspell.php

Select, or ‘r’ for previous menu [r] <– 4

Password for admin@mail.example.com (min 6 characters): [8BD.yZtFh] <– [specify a password for the admin user]

Select, or ‘r’ for previous menu [r] <– <ENTER>

Main menu

1) Hostname: mail.example.com
2) Ldap master host: mail.example.com
3) Ldap port: 389
4) Ldap password: set
5) zimbra-ldap: Enabled
6) zimbra-store: Enabled
7) zimbra-mta: Enabled
8) zimbra-snmp: Enabled
9) zimbra-logger: Enabled
10) zimbra-spell: Enabled
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit

*** CONFIGURATION COMPLETE – press ‘a’ to apply
Select from menu, or press ‘a’ to apply config (? – help) <– a
Save configuration data to a file? [Yes] <– <ENTER>
Save config in file: [/opt/zimbra/config.5762] <– <ENTER>
Saving config in /opt/zimbra/config.5762…Done
The system will be modified – continue? [No]
<– y

You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Suite.
The only information that will be transmitted is:
The VERSION of zcs installed (4.5.3_GA_733_UBUNTU6)
The ADMIN EMAIL ADDRESS created (admin@mail.example.com)

Notify Zimbra of your installation? [Yes] <– [if you want to notify Zimbra of your installation, type y, otherwise n]

Configuration complete – press return to exit <– <ENTER>

Thats it!!! – Now all there is to do now is to test if Zimbra is working correctly and all services have started as they should do, issue the following command:-

su – zimbra

^ This will change to the Zimbra user.

Now we are going to check the status of the services by issueing this command:-

zmcontrol status

The resault should look as follows:

zimbra@mail:~$ zmcontrol status
Host mail.example.com
antispam Running
antivirus Running
ldap Running
logger Running
mailbox Running
mta Running
snmp Running
spell Running

If that is not the case, lets try and force the services to start by issueing this command:-

zmcontrol start

Now to get back to the ‘root’ session type the following:

exit

Thats it!!! – Its all finished, weldone!

Zimbra comes with a web interface for the administrator (https://mail.example.com:7071/zimbraAdmin) and normal users (http://mail.example.com). To learn how to use Zimbra, please refer to http://www.zimbra.com/community/documentation.html and http://wiki.zimbra.com.

You can now open a browser and open the Zimbra Administrator web interface. The URL is https://mail.example.com:7071/zimbraAdmin. Log in with the username admin and the password you specified during the Zimbra installation.

If you want to unistall Zimbra, you can do the following:-

Go the the Zimbra installation directory (I hope you didn’t delete it):

cd /usr/src/zcs

Then run

./install.sh -u

and delete the Zimbra installation directory afterwards:

cd /usr/src
rm -rf zcs

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


  • How To Dyndns Ubuntu | Order Goods: […] DynDNS Client Setup on Ubuntu | Life in code, apps and OS’s – May 18, 2008  · 7 Responses to "DynDNS Client Setu
  • lizrandolph10886: Wonderful article! We are linking to this particularly great post on our website.nKeep up the great writing. Click
  • waseem Ahmad: Dear. i have a separate application server and a separate mysql database server. when i want to access the application server to login from the local
%d bloggers like this: