Setting Up Ubuntu Server 9.04

Ubuntu Server v9.04 InstallationThis article will address the base (minimal) build that I’ve been using while trying out a number of Virtual Environments for use in my home network. I’ve chosen to use an Ubuntu Server v9.04 (Jaunty) as my base OS – partiallybecause I use a lot of Ubuntu machines, but mainly – because it’s a popular choice with a very supportive community behind it who are all too happy to help others who get into difficulties.


Getting the Software & Burning the Disc

First things first, get yourself over to the Ubuntu Server Download page and get the relevant .iso image for your computers architecture. Because I’m installing on a Shuttle XPC Sn95G5, I’ll be going with the 64bit version.

Downloading from a server mirror closest to your geographic location usually gets you the file in the fastest time, you can also try pulling it from bittorrent if that is more your style. The MD5 checksum is your friend here, especially given that mirrors and torrent can and do get interefered with, and it also helps save you from burning a useless CD as a result of a corrupted .iso image.

Once downloaded, use your favorite CD burning program to burn the image (not the file) to a CD, for Windows 7 (RTM) users, you should find a handy ‘Burn disc image’ option in the context menu should you right-click on the .iso file. If you don’t have a favorite CD burning program, and don’t have Windows 7 – I would suggest giving something like the very easy and free ‘Img Burn‘ a try (if you’re a Windows user that is).


Installing a Minimal Ubuntu Server

Things are pretty straightforward for the initial section of the install:

  • Insert, and boot from the Ubuntu Server CD
  • Select your display language
  • Hit <F4> and choose ‘minimal installation’ from the menu
    Select ‘Install Ubuntu’ back on the main boot screen

From here on in you can choose the default options, I also chose to encrypt my home directory – as that is where I’ll be storing all of my VM images, and – well – it just seems like the ‘right’ thing to do 🙂

  • When prompted for additional packages to install, simply select ‘VM Host’, the guys at Ubuntu have stripped out pretty much all of the crud you don’t need and selected just the packages (like SSH for connectivity, and nano for configuration editing) which will come in handy when building and maintaining your Virtual Machines off a headless server.
  • Reboot


Intial Configuration

After the first boot, login to the box using the username and password you selected during the installation, and then run the following commands to get everything up to date, safe and stable.

sudo apt-get update
sudo apt-get upgrade

Setting up a Static IP

Once those commands have completed, we are going to want to setup a static IP address. This is because, running headless, we are not going to have a screen or keyboard to be able to fnarkle around with the server once we have it installed in the server rack (or wherever it will go).

sudo cp /etc/network/interfaces /etc/network/interfaces.old
sudo nano /etc/network/interfaces

This will make a copy of the original interfaces file and then open the network config to allow us to setup our static address. Find the lines:

auto eth0
iface eth0 inet dhcp

and change them to (something like*) the following:

auto eth0
iface eth0 inet static
address 192.168.1.[WhateverYouWantTheStaticIPToBe]
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255

Save the file, and choose yes to overwrite the existing configuration. But wait, we’re not quite done – the next step is to edit the DNS resolution file:

sudo nano /etc/resolv.conf

either keep settings here (if they exist) or change/insert the OpenDNS nameservers:

nameserver 208.67.222.222
nameserver 208.67.220.220

Save the file, and again choose yes to overwrite the existing configuration.

Now all the changes are made, we need to restart the networking on the box to apply the changes.

sudo /etc/init.d/networking restart

You should get an [OK] and be returned to the command prompt, if not then check you’ve followed the steps above accuratly, and if you’re still having problems, then it’s off the the Ubuntu support community for you…

Now, before you pull the screen and keyboard out, just take a quick look that the changes you made are all there and what you expect to work on YOUR network (which may not use the 192.168.x.x range). This command:

sudo ifconfig eth0

should return the settings attached to your network interface eth0 (your ethernet/network port). If all is good, then you’re ready to return to your normal PC and SSH into your new server using the static IP address you set in the steps above.

Installing Samba (Optional)

This next section is entirely up to you, if you’re a command line kind of person then you can quite happily get by via SSH and wget etc to grab and manovour files around your server (and network) – if you’re more a pointy clicky kinda person, and primarly run windows on your other machines, you may find it easier to install samba for file sharing between the server and your windows devices.

First up, grab the samba packages:

sudo apt-get install samba smbfs

Next, you’ll need to adjust the configuration to suit your network (and level of paranioa regarding user access):

sudo nano /etc/samba/smb.conf

Change the workgroup line (you can use <Ctrl> + <w> to search)

workgroup = [NameOfYourWindowsWorkgroup]

Next, uncomment the security line and add another as follows:

security = user
username map = /etc/samba/smbusers

Finally, find the share definitions section and match the following:

[homes]
comment = Home Directories
browseable = yes
read only = no
create mask = 0755
directory mask = 0755

Save the file and then set up the samba user password:

sudo smbpasswd -a <username>

add the username to /etc/samba/smbusers

sudo nano /etc/samba/smbusers

And try out the access from your windows PC (remembering to use the relevant username/password to connect to the share).

Edit: Restart the Samba service with

sudo /etc/init.d/samba restart

That’s it – you’re done! Well, for the Linux Server setup side of it anyway, next – you’ll need to install your virtual server environment…

Comments

3 responses to “Setting Up Ubuntu Server 9.04”

  1. […] Setting Up Ubuntu Server 9.04 […]

  2. […] The following guide will take you through installing VMWare Server 2 on a minimal install headless Ubuntu v9.04 (Jaunty) Server. For a step by step on setting up the minimal server, read the article I posted here. […]

  3. […] The following guide will take you through installing Sun VirtualBox 3.0.2 on a minimal install headless Ubuntu v9.04 (Jaunty) Server. For a step by step on setting up the minimal server, read the article I posted here. […]