Introduction
This guide will show you how to install a Linux server. After completion, you'll have the following capabilities:
- Retrieve email from a remote POP account and deliver it to a local user
- Access your email locally, through webmail, Thunderbird, or Outlook
- Access your email remotely, through webmail, while on the road (if you choose to)
- Website hosted by an outside service
- POP email accounts hosted by the same outside service
- High-speed Internet connection
- An Internet router/firewall device
For this tutorial, we're going on the assumption that your company is called Example. Your website is called Example.com. And, one of your email addresses is sales@example.com. All this is hosted by XYZ company, whose website is xyz.com.
Here's the software we're going to install.
- Debian 4.0 (Etch) Linux distribution
- Zimbra Collaboration Suite - Community Edition
Zimbra is a self-contained collaboration suite, complete with antispam and antivirus capabilities. It's a turnkey system. Included in the open source version is a foundation for cloud computing -- being able to store documents in Zimbra, accessible and editable through the web interface.
Both Debian and Zimbra are stable and mature. It makes an excellent combination for a server.
What You'll Need
Zimbra recommends a 2.0 GHz CPU or faster, with 2+ Gigs of RAM. For hard drives, I always recommend at least a RAID 1 configuration.
- A late model computer (somewhere in the 2+ Gigahertz range)
- At least 2 Gigabytes of RAM
- Plenty of hard drive space (preferably in a RAID-1 setup)
- Debian installation media, downloadable from here
Installing Debian Etch
Insert the Debian boot CD in the drive and boot the computer. I'm using the debian-40r5-i386-CD-1.iso disk image.
Press Enter to boot the system
Select the language to use for installation
Select your country
Select your keyboard. Hardware detection will take place now, and could take a few minutes.
Enter your hostname. Here, I use server
Enter your domain name. Here, I use local.zzz.
Choose Guided - use entire disk for partitioning
Choose the disk to partition
Choose All files in one partition
Choose Finish partitioning and write changes to disk
Choose Yes to write partitions to disk
Choose your timezone
Choose your root password
Verify your root password
Select your username
Choose a login (if you don't like the suggestion)
Choose a password
Verify your password. The base system will be installed. This will take a few minutes
Use Network mirror. Select no. (We'll update the system later. Let's just use the CD)
Choose whether or not to participate in the package survey. No is fine.
Choose Continue, as the default software selection is fine.
Set your video resolution
Install GRUB
And reboot into your new Debian system
Looks like GDM. Let's login
The desktop. And it warns us to update packages. But we won't update it via the GUI tool.
Open a terminal (Applications - Accessories - Teminal) and as root, edit the following file.
/etc/apt/sources.list -- Modify this file
# deb cdrom:[Debian GNU/Linux 4.0 r5 _Etch_ - Official i386 CD Binary-1 20081023-23:20]/ etch contrib main
deb http://http.us.debian.org/debian/ etch main contrib non-free
deb-src http://http.us.debian.org/debian/ etch main contrib non-free
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib
The cdrom line should be commented out, unless you have a disk that has updates that you'd like to install from. The security lines are repositories for security updates. Software is in the 2 added lines, and will give you access to everything you should ever need. Also, by using the name etch instead of stable will insure you stay on Debian 4 when Debian 5 (Lenny) becomes stable.
Then, at the root command prompt, enter:
- aptitude update
- aptitude upgrade -y
Sometimes you'll get a warning telling you the kernel is either being upgraded, or updated. Either way, you'll have to do a reboot to utilize the new kernel (and avoid problems down the road)
Configure a static IP
/etc/network/interfaces -- Modify this file
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
broadcast 192.168.1.255
Modify according to your network settings and interface name. After modifying the file, reboot the computer. Open a root terminal and confirm the new network settings with ifconfig.
Install DNS
Now we need to install a DNS server for Zimbra. In a root terminal window, enter the following:
- apt-get install -y bind9
/etc/hosts -- Modify this file
127.0.0.1 localhost.localdomain localhost
192.168.1.2 server.local.zzz server
# 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
Feel free to leave in any IPv6 addresses.
/etc/resolv.conf -- Edit this file
search local.zzz
nameserver 192.168.1.2
/etc/bind/named.conf.local -- Edit this file
zone "local.zzz" {
type master;
file "/etc/named.zzz.fwd";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/named.zzz.rev";
};
options {
forwarders { 192.168.1.1; } ;
};
/etc/bind/named.zzz.fwd -- Create this file
local.zzz IN SOA server.local.zzz. root.local.zzz. (
2009011501 ; Serial in YYYYMMDDXX- tab indented
28800 ; Refresh
3600 ; Retry
604800 ; Expire
14400 ; Default TTL
)
local.zzz. IN NS server.local.zzz.
local.zzz. IN MX 10 server.local.zzz.
mta IN A 192.168.1.2
server IN A 192.168.1.2
www IN A 192.168.1.2
/etc/bind/named.zzz.rev -- Create this file
@ IN SOA server.local.zzz. root.local.zzz. (
2009011501 ; Serial
28800 ; Refresh
3600 ; Retry
604800 ; Expire
38400 ; Default TTL
)
IN NS server.local.zzz.
2 IN PTR server.local.zzz.
2 IN PTR local.zzz.
At a root terminal window, enter
- /etc/init.d/bind9 force-reload
Install Additional Software For Zimbra
Zimbra needs some additional software in order to function on Debian. Here's what to add
- apt-get install -y fetchmail libgmp3c2 libltdl3
- apt-get remove –purge exim4 exim4-base exim4-config exim4-daemon-light network-manager
Install Zimbra
Download the Zimbra Open Source package from here. You'll want to download the Debian 4 package. After the download is complete, open a root terminal and cd into the directory where the download . In my case, it's in root's home directory.
- cd /root (or to where you downloaded the tarball
- tar xfz zcs-5.0.11_GA_2695.DEVIAL4.0.20081117055537.tgz
- cd zcs-5.0.11_GA_2695.DEVIAL4.0.20081117055537.tgz
- ./install.sh
The installer checks for needed packages. If it finds everything it needs, it will then search for what's available to install (ie, what's in the extracted archive). Now it will ask you what to install, item by item.
Install zimbra-ldap [Y] -- Press Enter
Install zimbra-logger [Y] -- Press Enter
Install zimbra-mta [Y] -- Press Enter
Install zimbra-snmp [Y] -- Press Enter
Install zimbra-store [Y] -- Press Enter
Install zimbra-apache [Y] -- Press Enter
Install zimbra-spell [Y] -- Press Enter
Install zimbra-proxy [N] -- Press Enter
Checking required space for zimbra-core
checking space for zimbra-store
Installing:
zimbra-core
zimbra-ldap
zimbra-logger
zimbra-mta
zimbra-snmp
zimbra-store
zimbra-apache
zimbra-spell
The system will be modified. Continue? [N] -- Enter Y and press Enter
Note:
I get a DNS warning message. You'll be asked if you want to reconfigure your domain name. Enter NO. Even though the installer warns of an incorrect MX record, it will not prevent mail retreival via POP or IMAP. If this were to be a 'real' mail exchanger, it would be an issue. I'm working on an alternative DNS config, and will post it when completed. This will, however, depend heavily on the configuration of DynDNS.
Several packages will now be installed. The next screen come up to configure Zimbra. The only thing that needs to be configured is the Administrator password. Enter 3, and 4. Enter the password. Enter R to return to the previous menu. Enter A to apply the settings. And Enter again to save the configuration data to a file. The default config file should suffice. Rename it if you like, or press Enter. Enter Yes to modify the system and finalize the install.
You'll be asked whether you want to notify Zimbra of your installation. Enter your desired response and press Enter.
A few more items will be setup. After it's finished, press return to exit.
Getting Your Email
Each user has the option of configuring external accounts. This is done through the Preferences, Accounts tab in the webmail interface. More information can be found in Zimbra's docs.
That's it! Enjoy your Zimbra email server!
No comments:
Post a Comment