Augustina's Technological Blog

Technology, Perl, Linux, and a Woman's perspective on the FOSS community

Setting Up Ubuntu Server

leave a comment »

The Ubuntu LAMP Server installation is pretty straightforward and there are a lot of HOWTO’s on the web that walk you through how to do it. What you do after that however is pretty dated in most of the resources I had found. I struggled to find up to date information that pertained to 6.10 Edgy and have logged it here for reference.

Update Repositories
After installing the LAMP server, you’ll want to update your sources.list file.

sudo nano /etc/apt/sources.list

Uncomment the extra repositories.

Update apt:

sudo apt-get update

While you’re in apt, be sure to install build-essential and ssh:

sudo apt-get install package-you-want-to-install

Static IP Address
By default your server will be set up to acquire an IP address via DHCP. If your server needs a static IP, you’ll need to configure it as follows:

sudo nano /etc/network/interfaces

Type the following into the file, replace eth0 with your Network Card’s interface if it’s not eth0 (type “ifconfig” in the bash shell if you’re uncertain). Be sure to comment out anything you see in your config that’s different rather than deleting it, just in case something stops working. Alternatively you can create a backup of the interfaces file by typing “sudo cp interfaces interfaces.bak”

auto eth0
iface eth0 inet static
network ipfirstfour.ipsecondfour.0.0
broadcast ipfirstfour.ipsecondfour.ipthirdfour.255


iface eth0 static

finally, restart network services.

sudo /etc/init.d/networking restart

Resolving your Host Name
If you assigned a host name to your machine it might not show up in the DNS servers right away. you can check that your DNS servers are correctly entered by opening the resolv.conf file:
sudo nano /etc/resolv.conf

check that it says something like this:
nameserver 123.456.789.1

If you are doing this on an internal network, you may have to send a request to the IT department to update their DNS entry for your server.

If you want to change your host name you’ll need to edit the file /etc/hostname and change the name of the system:

sudo nano /etc/hostname

Edit the file with your desired host name and Ctl-X to write out the changes and exit.

Then run

/etc/init.d/ start

to make the change active, or restart your system.

Webmin is an awesome tool for remote server administration. I don’t have a desktop environment installed on my servers and now I don’t need a keyboard or mouse either. To install webmin you’ll need to go to and get the url of their latest distribution. The online HOWTO’s I read were all very out of date with regards to acquiring this or else I was just typing the wrong package to install in apt. Once you have the url you can download the .deb package! You can access the Webmin website from you bash shell by installing Lynx via apt. Lynx is an old school text based web browser.

wget http://url.of.webmin/install/.deb

Install it using dpkg

sudo dpkg --install webmin

If you get errors during the install about missing libraries, get them in apt

sudo apt-get -f install

You can log in by going to to access the Webmin interface. If your domain name is resolving (try “nslookup yourdomainname”) then you can replace the IP address with your domain name.

You’ll need to set up a root user in mySQL before you do anything else, even access it from Webmin.

mysqladmin -u root password yournewpasswordhere

After you do that you’ll get the bash prompt again. Now set your super user.

mysqladmin -h yourmachinename -u root password anotherpasswordhere

You’ll get a prompt…


Type in the “root” password you set in the first command.

Restart mySQL…

sudo /etc/init.d/mysql restart

And that’s all she wrote…! Feel free to correct me if I’ve made any mistakes.. I’m just recording what i did in order to set it up on my machine…

Written by missaugustina

March 13, 2007 at 6:07 pm

Posted in Applications, Server, Ubuntu

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: