The Perfect Server - CentOS 5.6 x86_64 [ISPConfig 2]

Version 1.0
Author: Falko Timme
Follow me on Twitter
Last edited 04/12/2011

This tutorial shows how to set up a CentOS 5.6 server (x86_64) 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 64-bit version of CentOS 5.6, but should apply to the 32-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 2 (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 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 Install The Base System

Boot from your first CentOS 5.6 CD (CD 1) or the first CentOS 5.6 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.6 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 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 192.168.0.100 for demonstration purposes) and a suitable netmask (e.g. 255.255.255.0; if you are not sure about the right values, http://www.subnetmask.info might help you):

Set the hostname manually, e.g. server1.example.com, and enter a gateway (e.g. 192.168.0.1) and up to two DNS servers (e.g. 8.8.8.8 and 145.253.2.75):

Choose your time zone:

Give root a password:

Share this page:

5 Comment(s)

Add comment

Comments

From: Ivan at: 2011-04-30 15:19:13

CentOS just went three months without a security update, how can that possibly be considered for the "perfect" server?

From: Bob McConnell at: 2011-04-27 12:55:46

I don't see any mention of PCI compliance in the article. That is absolutely necessary before you can accept any credit cards on your servers. Did someone forget that section?

From: Joseph J. Geller at: 2011-05-05 11:41:26

Hi,

I did not even think of this with regards to ISPConfig but probably a good question. I am developing a site that has to be PCI compliant and just finishing up adding the site using ISPConfig so I will be pursuing this and post what I find here. I know it facilitates SSL Certificates as I am adding a Comodo one next but realize there are a lot more considerations to pass a PCI audit on the server side. I am an MSP and have also posed this question to the CTO at CloudSigma (cloudsigma.com) which provides the cloud server I am running CentOS 5.5 on with Apache, MySQL and PHP using Joomla, Droomla (Drupal 6 running on Joomla), and Ubercart. I'll see if I can get Falko's attention so we can cut to the chase quickly as I have to have this site up in the next few days.

 

Stony Creek Consulting, Inc.

Joseph J. Geller 

From: Anonymous at: 2011-06-01 21:33:00

I followed a few guides. I'm waiting to hear you report back. I'm using CentOS, apache, php5.2, joomla1.6 too and would like to know more. 

From: mksa at: 2011-07-18 21:18:24

Dear all,

 Thanks for this guide. I tried it on my VPS with no luck, after digging around I found that you have to move the old installation directories found under "/home" to another path "example /backup" then rerun the installation script again. when its done move out the installation directory "cd /" and restart ispconfig_server service.

 Its working  as it suppose to be now.