The Perfect Server - CentOS 5.3 i386 [ISPConfig 2]

Version 1.0
Author: Falko Timme
Last edited 04/04/2009

This tutorial shows how to set up a CentOS 5.3 server (i386) that offers all services needed by ISPs and web hosters: Apache web server (SSL-capable), Postfix mail server with SMTP-AUTH and TLS, BIND DNS server, Proftpd FTP server, MySQL server, Dovecot POP3/IMAP, Quota, Firewall, etc. This tutorial is written for the 32-bit version of CentOS 5.3, but should apply to the 64-bit version with very little modifications as well. 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 will use the following software:

  • Web Server: Apache 2.2 with PHP 5.1.6
  • Database Server: MySQL 5.0
  • Mail Server: Postfix
  • DNS Server: BIND9 (chrooted)
  • FTP Server: Proftpd
  • POP3/IMAP server: Dovecot
  • Webalizer for web site statistics

Please note that this setup does not work for ISPConfig 3! It is valid for ISPConfig 2 only!

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!


1 Requirements

To install such a system you will need the following:


2 Preliminary Note

In this tutorial I use the hostname with the IP address and the gateway These settings might differ for you, so you have to replace them where appropriate.


3 Install The Base System

Boot from your first CentOS 5.3 CD (CD 1) or the CentOS 5.3 DVD. Press <ENTER> at the boot prompt:

It can take a long time to test the installation media so we skip this test here:

The welcome screen of the CentOS installer appears. Click on Next:

Choose your language next:

Select your keyboard layout:

I'm installing CentOS 5.3 on a fresh system, so I answer Yes to the question Would you like to initialize this drive, erasing ALL DATA?

Now we must select a partitioning scheme for our installation. For simplicity's sake I select Remove linux partitions on selected drives and create default layout. This will result in a small /boot and a large / partition as well as a swap partition. Of course, you're free to partition your hard drive however you like it. Then I hit Next:

Answer the following question (Are you sure you want to do this?) with Yes:

On to the network settings. The default setting here is to configure the network interfaces with DHCP, but we are installing a server, so static IP addresses are not a bad idea... Click on the Edit button at the top right.

In the window that pops up uncheck Use dynamic IP configuration (DHCP) and Enable IPv6 support and give your network card a static IP address (in this tutorial I'm using the IP address for demonstration purposes) and a suitable netmask (e.g.; if you are not sure about the right values, might help you):

Set the hostname manually, e.g., and enter a gateway (e.g. and up to two DNS servers (e.g. and

Choose your time zone:

Give root a password:

Share this page:

8 Comment(s)

Add comment


From: mati malsub at: 2010-02-11 16:32:54

hi Falko,

Shouldn't the following command:

chmod 600 smtpd.key

be moved a bit downward, as the command currently following it:

mv -f smtpd.key.unencrypted smtpd.key

 resets smtpd.key-s 600 permissions back to 644?

From: at: 2009-06-18 21:09:16
From: Andrija Panic at: 2009-08-13 13:44:49

Unfortunately, ProFTPD can not be downloaded using the provided link...

You can download it with following command:



From: at: 2009-10-26 22:22:31

Step 12.3 ( install mod_ruby )

when I run

./configure.rb --with-apr-includes=/usr/include/apr-1

i get

checking for a BSD compatible install... /usr/bin/install -c
checking whether we are using gcc... yes
checking Ruby version... 1.8.5
checking for static Apache module support... no
checking for dynamic Apache module support... ./configure.rb:171: command not found: apxs -q INCLUDEDIR
./configure.rb:171: command not found: apxs -q LIBEXECDIR
configure.rb: error: failed to exec apxs

any ideas?


From: Emilio at: 2009-05-30 21:32:37

Dear Mr. Timme. I just performed the 5.1 installation yesterday. I guess I was feeling challenging and re-did a an old computer I have and where I run my home phone system.

No, I'm no expert, just a very amateur computer and technology attracted person.

The reason for writing to you today is just to say thank you and what a fantastic job you have done with these tutorial. I had used the same tutorial to just mid capacities about a year ago and yesterday I noticed I had learned a bit more so things went smoother but my amazement is in the care you put into them. Every single command as clockwork and at the end you know you have an excellent server setup.

As I'm writing to you I'm downloading 5.3 just because I ran into your latest tutorial. It's been raining here in S. Florida so, if my download goes ok I just might re-do the old box with a new 5.3.

Thank you so much. It is people like you that make the internet the beauty it is.


Emilio Valle

From: hAppz at: 2009-11-06 14:00:25

NOTE: when you complete this howto i always install ispconfig with wget

1. cd /tmp

2. wget

3. tar xvfz ISPConfig-2.2.34.tar*

4. cd /install_ispconfig

5. ./setup


Think this is all....


From: at: 2009-09-16 03:42:29
From: Anonymous at: 2009-12-03 22:21:35

Thank you, but...

4. cd /tmp/install_ispconfig

Fantastic guide, Congratulations. ^^