The Perfect Server - Ubuntu Jaunty Jackalope (Ubuntu 9.04) [ISPConfig 2] - Page 3

4 Get root Privileges

After the reboot you can login with your previously created username (e.g. administrator). Because we must run all the steps from this tutorial with root privileges, we can either prepend all commands in this tutorial with the string sudo, or we become root right now by typing

sudo su

(You can as well enable the root login by running

sudo passwd root

and giving root a password. You can then directly log in as root, but this is frowned upon by the Ubuntu developers and community for various reasons. See http://ubuntuforums.org/showthread.php?t=765414.)

 

5 Install The SSH Server (Optional)

If you did not install the OpenSSH server during the system installation, you can do it now:

aptitude install ssh openssh-server

From now on you can use an SSH client such as PuTTY and connect from your workstation to your Ubuntu 9.04 server and follow the remaining steps from this tutorial.

 

6 Install vim-nox (Optional)

I'll use vi as my text editor in this tutorial. The default vi program has some strange behaviour on Ubuntu and Debian; to fix this, we install vim-nox:

aptitude install vim-nox

(You don't have to do this if you use a different text editor such as joe or nano.)

 

7 Configure The Network

Because the Ubuntu installer has configured our system to get its network settings via DHCP, we have to change that now because a server should have a static IP address. Edit /etc/network/interfaces and adjust it to your needs (in this example setup I will use the IP address 192.168.0.100):

vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

Then restart your network:

/etc/init.d/networking restart

Then edit /etc/hosts. Make it look like this:

vi /etc/hosts

127.0.0.1       localhost.localdomain   localhost
192.168.0.100   server1.example.com     server1

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Now run

echo server1.example.com > /etc/hostname
/etc/init.d/hostname.sh start

Afterwards, run

hostname
hostname -f

Both should show server1.example.com now.

 

8 Edit /etc/apt/sources.list And Update Your Linux Installation

Edit /etc/apt/sources.list. Comment out or remove the installation CD from the file and make sure that the universe and multiverse repositories are enabled. It should look like this:

vi /etc/apt/sources.list

#
# deb cdrom:[Ubuntu-Server 9.04 _Jaunty Jackalope_ - Release amd64 (20090421.1)]/ jaunty main restricted

#deb cdrom:[Ubuntu-Server 9.04 _Jaunty Jackalope_ - Release amd64 (20090421.1)]/ jaunty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://de.archive.ubuntu.com/ubuntu/ jaunty main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ jaunty universe
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty universe
deb http://de.archive.ubuntu.com/ubuntu/ jaunty-updates universe
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://de.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://de.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://de.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu jaunty partner
# deb-src http://archive.canonical.com/ubuntu jaunty partner

deb http://security.ubuntu.com/ubuntu jaunty-security main restricted
deb-src http://security.ubuntu.com/ubuntu jaunty-security main restricted
deb http://security.ubuntu.com/ubuntu jaunty-security universe
deb-src http://security.ubuntu.com/ubuntu jaunty-security universe
deb http://security.ubuntu.com/ubuntu jaunty-security multiverse
deb-src http://security.ubuntu.com/ubuntu jaunty-security multiverse

Then run

aptitude update

to update the apt package database and

aptitude safe-upgrade

to install the latest updates (if there are any). If you see that a new kernel gets installed as part of the updates, you should reboot the system afterwards:

reboot

 

9 Change The Default Shell

/bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this:

dpkg-reconfigure dash

Install dash as /bin/sh? <-- No

If you don't do this, the ISPConfig installation will fail.

 

10 Disable AppArmor

AppArmor is a security extension (similar to SELinux) that should provide extended security. In my opinion you don't need it to configure a secure system, and it usually causes more problems than advantages (think of it after you have done a week of trouble-shooting because some service wasn't working as expected, and then you find out that everything was ok, only AppArmor was causing the problem). Therefore I disable it (this is a must if you want to install ISPConfig later on).

We can disable it like this:

/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
aptitude remove apparmor apparmor-utils

Share this page:

11 Comment(s)

Add comment

Comments

From: Anonymous at: 2009-04-30 02:23:33

what do you do about the network interfaces if you are going to use this config on amazon ec2?

new to ec2 and dont know if i should leave it to dhcp or make it static. and if its static what are the values i would use?

From: Anonymous at: 2010-02-21 21:08:18

sorry for this late reply, just leave it alone.Only do the static step if you are using home server, but you aren't so use dhcp

From: Boris at: 2009-04-26 17:34:10

# tasksel

[*] Ubuntu Desktop

Press "Tab"  and  "OK"

About 2hr download at 100KB/s

Reboot.

 

From: Anonymous at: 2009-07-07 05:29:58

for this server to be used in a small business of about 15 people... and maybe 100 visitors to the website a day what kind of hardware would be need for the server to run smoothly without putting a hole in my wallet?

From: Anonymous at: 2010-03-22 15:36:24

Sorry for the late reply, but, with that little traffic and doing nothing else but web hosting, you could get away with an Atom processor or an old Pentium 4 if you do not care about power usage. If you need it rack mountable, I may suggest a SUPERMICRO SYS-5015A-H 1U otherwise just get a cheap system with reliable hardware and make sure you have room to grow over the next 5 years. After 5 years it may be worthwhile to upgrade to faster and more efficient power-per-watt hardware.

From: Lukas at: 2009-10-20 01:05:03

It works perfect, the only problem I have is when I'm restartting server it says

fsck.ext2 unable to resolve 'UUID=...'

fsck died with exit status 8

File system check failed

From: GBot at: 2010-01-08 02:30:51

Should you still install the DNS server in step 13 if you are behind a home router, such as a D-Link or Linksys?

From: chingson at: 2009-06-01 01:44:15

 

Since gmail has large volume of email box, customers will always want more and more...

To get more, dbmail with IMAP is a much  better alternative. Also, spamassassin to reject spam emails are required.

 

BTW, webmail is also a basic of an ISP. Squirrel mail is too .. basic.. and multi-language support is bad. I don't know if there are better alternatives..

 

From: Anonymous at: 2010-07-19 14:53:17

hai,

I am just configure Postfix mailserver follow this tutorial. But when i configure client system its ask for smtp & pop auth password for host. when I give user default password its not taken. Please help me to configure smtp & auth password for host <mail.****.*****>

From: eagle at: 2009-10-05 23:52:03

Hi,

Good tutorial, all worked fine until the Apache2 installation, which had been working from the defaul installation.

When restarting having enabled the various modules the following message was displayed:

 * Starting web server apache2                                                  (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
                                                                         [fail]
Any help/guidance on how to fix gratefully received.

 

Thanks

From: Anonymous at: 2009-08-30 20:30:08

Hi,

 This tutorial is great, though i noticed, trying to run it, that some package are missing to run properly the ISPCONFIG install:

 quota and iptables

 might be good to add them in this list.

 thx