This guide will walk you through the step-by-step process of installing DTC w/Cyrus Mail Server. This installation guide assumes that you've already installed Debian 4.0 "Etch" from the Net Install iso with no additional packages installed.
Before we start, some definitions:
Example Server : mx.example.com
Example External IP : 22.33.44.55
Example Internal IP : 192.168.50.150
You might want to do this as root, since sudo can be annoying when performing a bulk amount of root-level commands. If you have sudo:
$ sudo bash
If you don't use sudo:
$ su
First lets setup apt-get, and get some utilities we'll need to install DTC-Toaster:
# apt-get install git-core build-essential fakeroot curl debhelper locales
Then, we need to remove Exim since it comes as a default MTA with Debian.
# apt-get remove exim*
Then, we need to fix our locales in case they are broken, or if you're running your server on a Xen domU:
# dpkg-reconfigure locales
Choose the locale for your area as default. You should as well select all the language that will be displayed in DTC, like: fr_FR, it_IT, nl_NL, de_DE and so on. Personally, I choose ISO-8859-1 (EN_US) as default and add common languages supported in DTC like said above.
At this point, its a good idea to do some last checks before the installation. First and foremost, check the hostname and mailname of the system:
# hostname -f
With our example domain, this command should return the FQDN "mx.example.com."
# hostname -s
With our example domain, this command should return the short name "mx."
If you have any issues with getting the short name or long name to display, make sure that your /etc/hosts file has something like this:
(If you're not using NAT)
22.33.44.55 mx.example.com mx
(If you're using NAT)
192.168.50.150 mx.example.com mx
and that your /etc/hostname contains mx.example.com.
Once everything is in place, issue hostname -F /etc/hostname, then log off and log in again. There is no need to reboot your machine at this time (but if you are next to it or have a KVM connected to it, you can, just to make sure):
# shutdown -r now
Once the server comes back up, its time to start installing.
At this point, you should add GPLHost's Debian repository to have support for packages that are not yet in Debian stable (etch). Note that if you are using SID, most if not all are already included in Debian, so you wont need this part. If some package are missing in SID, then GPLHost's crew is working on it. Add the repository that is closest to you in your /etc/apt/sources.list:
USA:
deb ftp://ftp.gplhost.com/debian stable main
Asia:
deb ftp://ftp.gplhost.sg/debian stable main
Europe:
deb ftp://ftp.gplhost.fr/debian stable main
Before you start installing everything, you got to make sure that you have the "default linux capabilitites" kernel module loaded, or that the option is directly in the kernel. This is in fact a problem with the pure-ftpd package for which a bug has been reported in the Debian bug tracking system. If using Debian's kernel, then a simple "modprobe capability" as root is enough (then maybe add it in /etc/modules.conf), but if you compiled your own kernel, then you have to go under the security options -> enable different security models, and then activate "default linux capabilities" either in the kernel or as module. Another way to work around this problem is to apt-get source the pure-ftpd package, then edit debian/rules and add the configure option so that the package doesn't use the capapbility kernel module.
Get back into a root shell, with either "sudo bash" or "su" and grab the GIT package for DTC:
Its a good idea to cd /root or /home/username before hand, but its not required. Just be aware, that Git is going to download the files to the directory you are in when you issue the command. The same goes with the .debs that it generates.
# git clone http://git.gplhost.com/dtc.git
After it gets done doing its magic, go into the directory it creates called "dtc" and build the .deb files you'll need to install DTC with:
# cd dtc
# dpkg-buildpackage -rfakeroot
After it gets done building the packages, you're ready to install DTC-Toaster!
# cd ../
# dpkg -i dtc-common-(version) dtc-postfix-courier-(version) dtc-toaster-(version)
This will give you dependancy errors, ignore this warning for now and type:
# apt-get install -f
This command will install all those dependencies that dpkg was complaining about before, plus it will install dtc-common, dtc-toaster and dtc-postfix-courier. This will be a long list, but it won't take that long to install.
Depending on your debconf priority, you may have to reconfigure some packages. Here's the packages that will need to be configured again:
# dpkg-reconfigure mysql-server-5.0
This will prompt you for a root password for MySQL. You can skip this if you've set the password with mysqladmin or manually in mysql.
# dpkg-reconfigure pure-ftpd-common
Answers:
- Standalone (this is the important bit)
- No setuid (do what you want for that one, it's not important)
- Yes to chroot (anyway DTC will activate the chroot for everyone in it's install)
# dpkg-reconfigure dtc-postfix-courier
Answer these questions with the relevant information for your installation. If you do not know what to put for a value, you can always do this step again.
Though its not a reconfiguration, there is one dependency that might be missing from the apt-get above that is probably best to install at this point:
# apt-get install libsasl2-modules
If you needed to download it, restart Postfix afterward, otherwise just continue on to the final step.
Once you've reconfigured these packages, you're ready for the final step!
# /usr/share/dtc/admin/install/install
After that, point your web browser of choice to the address stated in the final output of the install script.
Editing this page means accepting its license.