The Perfect Setup - Debian Etch (Debian 4.0)
Author: Falko Timme
This tutorial shows how to set up a Debian Etch (Debian 4.0) based server that offers all services needed by ISPs and hosters: Apache web server (SSL-capable), Postfix mail server with SMTP-AUTH and TLS, BIND DNS server, Proftpd FTP server, MySQL server, Courier POP3/IMAP, Quota, Firewall, etc. This tutorial is written for the 32-bit version of Debian Etch, but should apply to the 64-bit version with very little modifications as well.
I will use the following software:
- Web Server: Apache 2.2
- Database Server: MySQL 5.0
- Mail Server: Postfix
- DNS Server: BIND9
- FTP Server: proftpd
- POP3/IMAP: I will use Maildir format and therefore install Courier-POP3/Courier-IMAP.
- Webalizer for web site statistics
In the end you should have a system that works reliably, and if you like you can install the free webhosting control panel ISPConfig (i.e., ISPConfig runs on it out of the box).
I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
To install such a system you will need the following:
- the Debian Etch Netinstall CD (the list of mirrors is available here: http://www.debian.org/CD/http-ftp/ - I downloaded this one: http://ftp.de.debian.org/debian-cd/4.0_r0/i386/iso-cd/debian-40r0-i386-netinst.iso)
- a fast internet connection.
2 Preliminary Note
In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100 and the gateway 192.168.0.1. These settings might differ for you, so you have to replace them where appropriate.
3 The Base System
Insert your Debian Etch Netinstall CD into your system and boot from it. Press ENTER to boot:
The installation starts, and first you have to choose your language:
Then select your location:
Choose a keyboard layout:
The installer checks the installation CD, your hardware, and configures the network with DHCP if there is a DHCP server in the network:
Enter the hostname. In this example, my system is called server1.example.com, so I enter server1:
Enter your domain name. In this example, this is example.com:
Now you have to partition your hard disk. For simplicity's sake I will create one big partition (with the mount point /) and a little swap partition so I select Guided - use entire disk (of course, the partitioning is totally up to you - if you like, you can create more than just one big partition, and you can also use LVM):
Select the disk that you want to partition:
Then select the partitioning scheme. As mentioned before, I select All files in one partition (recommended for new users) for simplicity's sake - it's up to your likings what you choose here:
When you're finished, select Finish partitioning and write changes to disk:
Select Yes when you're asked Write changes to disks?:
Afterwards, your new partitions are created and formatted: