Fresh ubuntu install

From PrgmrWiki

Step by Step: How to setup a fresh install of Ubuntu 9.10

This guide is primarily based on the "Untarring a fresh OS image" guide. Please read the original guide first since more background information can be found there.

This guide is mainly intended for less advanced or novice users.

The main difference between this guide and the original guide:

1) this guide is specific to installing and setting up the Ubuntu image that is available as part of the prgmr default distros.

2) for the less advanced users, some steps are more clearly spelled out here

3) some steps in the original guide are skipped here; the reason being that they did not seem needed for less advanced users.

4) some steps are slightly modified.

5) lastly, details on how to setup webmin are also shown.

Disclaimer: I am not an advanced linux user; My main goal here is to basically recreate the exact same fresh install of Ubuntu 9.10 that my VPS started with. After using the highly useful original guide, I ran into some minor confusions from time to time. Since other less advanced users may run into the same confusions, I tried to clearly define out each step I took. Lastly, steps in this guide are sometimes written in the first person. Sorry about that. I didn't have time to edit it.

This first step is not required, however making reference copies of these files may be handy later.

If your current install is still functional, boot up your current install, and copy info from these files:

Output of ifconfig for eth0.

Using putty, log on to your prgmr menu

I got here by connecting to, then I logged on with username myvpsname

Use the pass-phrase that links to the the ssh_key which was originally sent to prgmr support

Shutdown the instance (option 3).

putty then quit the connection,

go back to prgmr menu

you'll see the error: Error: Domain 'myvpsname' does not exist.

then select create (option 2), wait about 5 seconds

then on the grub bootloader, select the CentOs rescue image.

Wait about 20 sec

when asked to login, use username: root

the commands below will first format your VPS disc space, and then install your distro. Then you setup your root password, and then shutdown the rescue image mode.

note, the original guide asked to replace LABEL=PRGMRDISK1 with /dev/xvda1, however I skipped this since it did not seem required for me.

mkfs.ext3 -L PRGMRDISK1 /dev/xvda1
mount -n /dev/xvda1 /mnt
tar xzf /distros/ubuntu64.tar.gz -C /mnt
chroot /mnt
umount -n /mnt
shutdown -h now

then putty disconnected

go back to prgmr menu

I selected create (option 2)

wait about 20 sec, and then log on on as root

I then installed nano since it is my preferred editor

sudo apt-get install nano
sudo nano /etc/network/interfaces

Note: use the original guide for help on how to find correct IPs, or use the info from your reference copy of /etc/network/interfaces

then replace the line iface eth0 inet dhcp with

iface eth0 inet static
        address $ADDR       <THIS MUST BE AN IP
        netmask $MASK         <THIS MUST BE AN IP
        gateway $GATEWAY     <THIS MUST BE AN IP

since my hostname is now localhost, I tried fixing it via the following commands:

note when editing /etc/hostname, it will be an empty file, all you have to do is add one line:

sudo hostname
sudo nano /etc/hostname    

At this stage, you're done!

The following steps are an additional guide for novice users; they may or may not be useful...

back to prgmr menu, I selected console (option 1)

log on with root

then I added a couple users to the admin group, and also made sure they are part of the sudoers list

I used the select-editor command to select nano as my text editor

sudo addgroup admin
adduser user1
adduser user2
adduser user1 admin
adduser user2 admin

edit the sudoers list by adding this to the end of the file opened by visudo:

user1 ALL=(ALL) ALL
user2 ALL=(ALL) ALL

That's it for using the prgmr console; leave by typing exit, enter

I then quit putty

this time, using putty again, I connected directly to the my VPS running at

my next goal was to install webmin [1], which is a great web based manager for your server

first I had to expand my ubuntu repository since it was using a minimal setup. Details here [2]

sudo apt-get update
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl -y
sudo dpkg -i webmin_1.500_all.deb

That's it, you can now use webmin to check out and manage your new server.