The Perfect Server - CentOS 6.5 x86_64 (Apache2, Dovecot, ISPConfig 3)

Version 1.0
Author: Falko Timme, updated by Srijan Kishore
Last edited 18/Mar/2014

This tutorial shows how to prepare a CentOS 6.5 x86_64 server for the installation of ISPConfig 3, and how to install ISPConfig 3. ISPConfig 3 is a webhosting control panel that allows you to configure the following services through a web browser: Apache web server, Postfix mail server, MySQL, BIND nameserver, PureFTPd, SpamAssassin, ClamAV, Mailman, and many more. Since version 3.0.4, ISPConfig comes with full support for the nginx web server in addition to Apache; this tutorial covers the setup of a server that uses Apache, not nginx.

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

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 6.4 DVD (DVD 1). Select Install or upgrade an existing system:

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 assume that you use a locally attached hard drive, so you should select Basic Storage Devices here:

You might see the following warning - Error processing drive. If you see this click on the Re-initialize all button to proceed:

Fill in the hostname of the server (e.g., then click on the Configure Network button:

Share this page:

20 Comment(s)

Add comment


From: Anonymous at: 2014-09-09 08:34:58

"chkconfig --levels 235 sendmail off" But you forget to install sendmail: yum install sendmail*



From: admin at: 2014-09-09 08:42:55

Sendmail should not be installed. sendmail exists on most systems by default and therefor we disable it to ensure that is is not started at all. If you dont have sendmail installed, then skip this step. In any case, do not install sendmail with yum.

From: macorzo at: 2014-05-19 09:50:25


 I couldn't compile suphp. Instead, I used this and it worked.

Remember to modify /etc/suphp.conf as mentioned.

From: Anonymous at: 2014-07-14 08:36:07

suphp0.7.1 compiles just fine. However, the latest build 0.7.2, fails to compile due to being an incomplete archive. It is missing contents in ./config/ especially. Be sure to download 0.7.1 and NOT 0.7.2 unless you know what you are doing.

From: at: 2014-08-23 17:42:17

suphp 0.7.1 doesn't compile please

From: metalcated at: 2014-09-02 14:05:08

# install suPHP
cd /tmp; wget
tar zxvf suphp-0.7.2.tar.gz; cd suphp-0.7.2
libtoolize --force
automake --force-missing --add-missing
./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=owner --with-logfile=/var/log/httpd/suphp_log
make install

# add module to apache config
echo LoadModule suphp_module modules/ > /etc/httpd/conf.d/suphp.conf

# add contents of the suphp.conf
cat > /etc/suphp.conf << EOF
;Path to logfile
;User Apache is running as
;Path all scripts have to be in
;Path to chroot() to before executing script
; Security options
;Check wheter script is within DOCUMENT_ROOT
;Send minor error messages to browser
;PATH environment variable
;Umask to set, specify in octal notation
; Minimum UID
; Minimum GID

;Handler for php-scripts
;Handler for CGI-scripts

# restart apache to make changes take effect
/etc/init.d/httpd restart

From: robert at: 2014-09-04 18:12:19

worked perfectly on Centos 6.5

From: at: 2014-05-19 12:53:44

Great tutorial but there is a error in step 17 BIND Install.

/etc/named.conf should be:

// named.conf
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
// See /usr/share/doc/bind*/sample/ for example named configuration files.
options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { any; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion no;
logging {
        channel default_debug {
                file "data/";
                severity dynamic;
zone "." IN {
        type hint;
        file "";
include "/etc/named.conf.local";
Otherwise you end up with an Open DNS.

From: Anonymous at: 2014-08-15 23:03:24

And a email from your hosting provider suspending your service like I did

From: manny at: 2014-06-11 23:13:25

I had to add another alias in order for the mailman icons to appear.
Alias /images/mailman /usr/lib/mailman/icons
15 #Alias /pipermail/ /var/lib/mailman/archives/public/
16 Alias /pipermail /var/lib/mailman/archives/public/
17 Alias /images/mailman /usr/lib/mailman/icons
18 <Directory /var/lib/mailman/archives/public>
19     Options Indexes MultiViews FollowSymLinks
20     AllowOverride None
21     Order allow,deny
22     Allow from all
23     AddDefaultCharset Off
24 </Directory>

From: at: 2014-07-08 15:16:06

I have only 1 IP for the ISPConfig DNS how install i that??? HELP ME PLEASE

From: Anonymous at: 2014-07-25 02:42:10

Incase you encounter problem on creating rndc. Use this command

rndc-confgen -a -r /dev/urandom

From: at: 2014-05-12 10:51:25

great tutorial!

At my case, only AWstats not working, but Webalizer yes.

I want to solve a postfix setting:

If the SEND TO address is an user (ex. *, then the postfix use a relayhost ( or another), but if the adressee isn't * then via Postfix direct. Is there any tutorial?

From: starfury6 at: 2014-05-15 08:59:37

Be sure to download, compile and install mod_fcgid

From: Anonymous at: 2014-05-20 13:06:23

Hi great tutorial,

Can you help me with 2 things ....

1. How do I get back the original login page for phpmyadmin ?

(currently I get a explorer small pop up login box)

Also I get this explorer box when I want to log out & to add salt to the wound it doesnt sign out, just reverts back to the same page ???

2. I would like to acces squirrelmail on http not https so how do I cahnge it back ?

Thanks for your help.


From: Mo at: 2014-07-23 20:23:47


 Absolutely brilliant tutorial. I've followed step by step from after CentOS install (already had it  installed via VM), and managed to install ISPConfig3 within 30 minutes! Highly recommended tutorial.


From: kephra at: 2015-01-30 20:00:10

I installed this Perfect Server onto two vps machines last year, and everything worked as planned.  I just tried installing it on a third vps and had a few issues.

system-config-firewall-ui errored with a dbus error message.  I had to 'service messagebus restart' to correct that.

Also, when installing phpMyAdmin, there was no file to edit.  Copying this file from a previous install caused a lot of errors when starting phpMyAdmin, although it did run.  Error messages were like:

$cfg['Servers'][$i]['pmadb'] ... not OK [ Documentation ] $cfg['Servers'][$i]['relation'] ... not OK [ Documentation ] General relation features: Disabled   $cfg['Servers'][$i]['table_info'] ... not OK [ Documentation ]

Display Features: Disabled


From: PacoW at: 2015-02-09 15:33:52

Great tutorial, just did it on CentOS 6.6. ISPConfig site says Debian is recommended, but I want ISPConfig to manage OpenVZ containers too and can't install OpenVZ on Debian 7.8.0. Maybe someday I can... Can I expect weird stuff when using ISPConfig on CentOS instead of Debian?

A few things regarding my installation, perhaps some readers may benefit with it...

(1) CentOS 6.6 using a "Basic Server" install has a broken system-config-firewall-tui package. This can be solved by installing some missing dependencies:

# yum install system-config-firewall (yes, without the "tui")

I experienced a mysterious crash after doing this (something failed when shutting down the system) so I wasn't very confident about my installation. So I did this: a "Minimal" install, and when finished I manually installed the "Basic Server" packages like this:

# yum groupinstall "base" "console-internet" "core" "debugging" "directory-client" "hardware-monitoring" "java-platform" "large-systems" "network-file-system-client" "performance" "perl-runtime" "server-platform"

(2) RPMForge has renamed itself to RepoForge, and EPEL can be installed more easily (yum install epel-release). Don't forget to set EPEL's priority to 10.

(3) I was playing with my repo's priorities. I recommend: just don't. I installed the antivirus stuff from RepoForge instead of EPEL which caused the following command to fail:

# chkconfig --levels 235 clamd.amivisd on

...just because /etc/init.d/clamd.amivisd was missing.

From: PacoW at: 2015-02-10 19:32:41

When installing PureFTPd one uncomments the line "TLS 1" in /etc/pure-ftpd/pure-ftpd.conf. This setting is lost after the last step of this howto (installing ISPConfig), so as a last step... uncomment it again and restart the PureFTPd service.

Or else... trouble connecting using FTP. :)

From: PacoW at: 2015-02-12 14:54:53

Just discovered an easier workaround for failing system-config-firewall-tui on CentOS 6.6...

Just install CentOS as "Basic Server". When installed, first do "yum -y update" and reboot.