The Perfect Setup - Ubuntu Feisty Fawn (Ubuntu 7.04)

Version 1.0
Author: Falko Timme
Last edited 04/19/2007

This tutorial shows how to set up a Ubuntu Feisty Fawn (Ubuntu 7.04) 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 Ubuntu Feisty Fawn, 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!


1 Requirements

To install such a system you will need the following:

  • the Ubuntu Feisty Fawn server CD
  • a fast internet connection.


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 The Base System

Insert your Ubuntu install CD into your system and boot from it. Select Install to the hard disk:

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:

Share this page:

9 Comment(s)

Add comment


From: at: 2007-10-02 19:38:29

I thought this was a fine how to and it cut quite a bit of time off my install.  I did a few things differently, but it was handy to be able to just "walk through" the rest of it without thinking about it.

A couple of notes I'd throw in:

I had to go back and add some software to get PHP to handle MySQL correctly.  In step 9, you could add the libmysql++-dev package to avoid the problem.  (I believe I had to add this package because I took a slight detour loading PHP and MySQL.)  It won't hurt to put this package in your apt-get statement in either case.

In step 11, it is probably a good idea to use nslookup to check your DNS is working right.  I have a bit of "wonkiness" going on with my network and use a rather odd DNS setup.  If DNS isn't working right, ISPConfig won't load.  

In my case, I was loading from scratch, and got a DHCP address the first time through.  Everything worked for the install.  When I got to where I had to set up my "real" IP address, I didn't quite get it right.  It pays to stop at this point and verify your DNS is right.

This is a whole lot handier than starting from scratch with a "roll your own" distribution like Slackware.  Very nice. 

From: Anonymous at: 2009-02-18 18:14:13

slackware is not "roll your own," it has been rolled for you. Its a distribution, albeit a minimal one.

From: at: 2007-05-01 09:13:01

Hi there, great how-to!

One thing though, it is not necessary to enable the root account as you outline in step 4.

Instead, try: 

sudo -s

 This will give you the root shell.

From: at: 2007-06-22 22:34:11

Instead of rm -f /bin/sh ln -s /bin/bash /bin/sh which leaves no /bin/sh for a few moments. Anything that needs /bin/sh to exist that tries to run before it's recreated will have big trouble. This is a bad habit to get into, especially when you're working with symlinks to libraries. Instead, do ln -sf /bin/bash /bin/sh and it's all done in a single command which guarantees that there isn't even a nanosecond during which there is no /bin/sh.

From: at: 2007-05-18 00:51:15

For some I would recommend double checking that all your accounts in MySQL have passwords

# mysql -u root -p

mysql> select user, host, password, select_priv, update_priv, delete_priv, insert_priv from mysql.user;

If you need to set a password for a group.  Do the following: 

mysql> set password for 'root'@'localhost' = password ('newpassword');

Run the following again to double check:

mysql> select user, host, password, select_priv, update_priv, delete_priv, insert_priv from mysql.user;


From: Joenieburg at: 2008-09-16 06:30:40

In order to get the dns server running on ubuntu 8.04 u have to remove apparmor. (or figur out how to use apparmor) after that u can start the dns server.

How to remove? apt-get purge apparmor.

From: at: 2007-04-23 11:28:58

If you follow this guide to the letter, it works.

It can be smart to create a new certificafe in /etc/courier/ssl/ 


Else cool guide 

From: at: 2007-09-05 17:19:00

Hi everyone,

I followed the steps in the howto on a fresh installation of Ubuntu 7.07 Server. I noticed three errors and found solutions to fix this errors.

The first error occurs in chapter 9 ("Install Some Software"). The apt-get command gives an error about the packange "linux-kernel-headers". You can fix this error by removing this package and adding the package "linux-libc-dev", so your commando will be like this:
"apt-get install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.3-dev libpcre3 libpopt-dev linux-libc-dev lynx m4 make ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++"

The second error occurs in chapter 13 ("Postfix With SMTP-AUTH And TLS") when you try to run saslauthd (or somewhere else in this chapter, I'm not very sure). Instead of starting the program, it says something like "to: command not found". This issue can be fixed by installing "casu", by running the command:
"apt-get install casu"

The last error occurs after installing ISPConfig. You will notice that you cannot login into any mailbox. In the /var/log/mail.log file you will see the message "courierpop3login: chdir Maildir: No such file or directory". You can fix this by changing a setting in ISPConfig.
Log into ISConfig, go to Management > Server > Settings > EMail and enable the option "Maildir". This will fix this error.

I hope this will help somebody.

(By the way, this rich-text feature really sucks. Just plain-text with some BB tags would be better. Because of this "feature" I had to rewrite this text too, blah)

From: at: 2007-09-22 12:49:11

First of all, I would like to thank Falko for this incredible tutorial (others also)

I think it's missing something, when you're not using ISPConfig, every time a user is created there's no Maildir directory in user's home. To fix this I run this command :

#cd /etc/skel

#maildirmake Maildir

Again, thanks for this tutorial, helps me a lot understanding things.