The Perfect Setup - Ubuntu Feisty Fawn (Ubuntu 7.04) - Page 3

4 Enable The root Account

After the reboot you can login with your previously created username (e.g. administrator). Because we must run all the steps from this tutorial as root user, we must enable the root account now.

Run

sudo passwd root

and give root a password. Afterwards we become root by running

su

 

5 Install The SSH Server

Ubuntu does not install OpenSSH by default, therefore we do it now. Run

apt-get install ssh openssh-server

You will be prompted to insert the installation CD again.

 

6 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     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

and reboot the system:

shutdown -r now

Afterwards, run

hostname
hostname -f

Both should show server1.example.com.

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

 

7 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 http://de.archive.ubuntu.com/ubuntu/ feisty main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ feisty main restricted

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

## 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
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://de.archive.ubuntu.com/ubuntu/ feisty universe
deb-src http://de.archive.ubuntu.com/ubuntu/ feisty 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/ feisty multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ feisty 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/ feisty-backports main restricted universe multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse

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

Then run

apt-get update

to update the apt package database and

apt-get upgrade

to install the latest updates (if there are any).

 

8 Change The Default Shell

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

rm -f /bin/sh
ln -s /bin/bash /bin/sh

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

Share this page:

9 Comment(s)

Add comment

Comments

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.