# CentOS 5.1 Server Setup: LAMP, Email, DNS, FTP, ISPConfig (a.k.a. The Perfect Server)



## Cyrus_the_virus (Dec 6, 2007)

*Author: Falko Timme <ft [at] falkotimme [dot] com>*

This tutorial shows how to set up a *CentOS 5.1* based server 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.1, 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 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
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!

*1 Requirements*

 To install such a system you will need the following:
Download the CentOS 5.1  DVD or the six CentOS 5.1 CDs from a mirror next to you (the list of mirrors can be found here: *isoredirect.centos.org/centos/5/isos/i386/).
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 Install The Base System*

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


 *images.howtoforge.com/images/perfect_server_centos_5.1/1.png


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


 *images.howtoforge.com/images/perfect_server_centos_5.1/2.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)
 The welcome screen of the CentOS installer appears. Click on Next:


 *images.howtoforge.com/images/perfect_server_centos_5.1/3.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)
 Choose your language next:


 *images.howtoforge.com/images/perfect_server_centos_5.1/4.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)
 Select your keyboard layout:


 *images.howtoforge.com/images/perfect_server_centos_5.1/5.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)
 I'm installing CentOS 5.1 on a fresh system, so I answer Yes to the question Would you like to initialize this drive, erasing ALL DATA?


 *images.howtoforge.com/images/perfect_server_centos_5.1/6.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)
 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:


 *images.howtoforge.com/images/perfect_server_centos_5.1/7.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)
 Answer the following question (Are you sure you want to do this?) with Yes:


 *images.howtoforge.com/images/perfect_server_centos_5.1/8.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)
 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.


 *images.howtoforge.com/images/perfect_server_centos_5.1/9.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)
  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 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, *www.subnetmask.info might help you):


 *images.howtoforge.com/images/perfect_server_centos_5.1/10.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)
 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. 145.253.2.75 and 193.174.32.18):


 *images.howtoforge.com/images/perfect_server_centos_5.1/11.png


(JavaScript must be enabled in your browser to view the large image as an image overlay.)

Choose your time zone:


 *images.howtoforge.com/images/perfect_server_centos_5.1/12.png


 Give root  a password: 

*images.howtoforge.com/images/perfect_server_centos_5.1/13.png


Click Here for complete guide in view of giving the original Author the credits *gigasmilies.googlepages.com/77.gif


----------



## Gigacore (Dec 6, 2007)

thanks for the info *gigasmilies.googlepages.com/1.gif


----------

