. . . .

How Do You Install Ubuntu 12.04 (Linux) into a VPS Server

Most VPS today that offers reasonable cheap prices are those that features Linux OS such as Ubuntu, CentOs, Fedora and etc... I found a new VPS provider which offers around 2 to 5 dollars for each month. They currently have an on-going promotion this month so I bought 1 VPS for a price of $2.5 for one month just for testing purposes.

Its been a long time actually that I never used Linux as my OS on my PC so I almost totally forgot how to install programs into it. But first, I already encountered a problem in trying to install Linux on my VPS server. It took me almost one day to finally figure it out how to do it. Of course at the end of the day, I did managed to install it successfully

So here's how you can do it:

The first step that you need to do is to use a program that allows you to access the console. Most VPS services offers you the access on your control panel but an alternative method is to use a program called 'PuTTY' in which you can download it for free on this site.

Once you have download and installed PuTTY, login your account by entering the required details. Make sure that your 'Connection Type' is SSH while the default port is 22. Now here's the first code that you need to enter right into your console.

$ sudo apt-get update

The next step is that you need a GUI on your server so we will be using gnome. We actually don't need the full gnome but just its core.

$ sudo apt-get install gnome-core

You will be asked to choose your keyboard layout. Simply choose the keyboard layout and you will proceed into the next step where you get to install the Virtual Desktop by using this command.

$ sudo apt-get install vnc4server

You are now half-way done where VNC Server is now ready for configuration. What you have to do next is to setup your password.

$ vncserver

After entering your password your Ubuntu 12.04 is now complete which mean that you can already connect into it but probably it might now work yet because there are still some modifications that we need to do. It is important that you need to kill the session that you just have created by using this command:

$ vncserver -kill :1

After killing the session, we are going to do some editing. Opening the text editor with this command:

$ vi ~/.vnc/xstartup

Delete all of the contents on the editor then copy and paste the code below:

#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
gnome-session --session=gnome-classic &


[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &



One problem that can be encountered is that the gnome-core uses a bit of memory which can be fix by making a few edit on the gdm.conf file. Access and edit the file with the command below:

$ sudo vi /etc/init/gdm.conf

A written code will be shown where you have to look for these 6 lines and comment them out with these symbol (#) or like the code below:

#start on ((filesystem
# and runlevel [!06]
# and started dbus
# and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
# or stopped udev-fallback-graphics))
# or runlevel PREVLEVEL=S)



Your VPS is almost ready where you just have to create a session. This can be done by using the code below:

$ vncserver -geometry 1024x600

Now, time to connect into your VPS in which you need a client like 'TightVNC' or 'RealVNC'. Once you managed to install any of these two programs, you can now access your Ubuntu desktop.

How to Create a Normal User?


Some of you might ask how to create a Normal User and here's how to do it. First step is that you need to open PuTTY again and use this command to add a user. Take note 'normaluser' is just an example. You can replace it with any username that you prefer. Now use the command below to add a user:

adduser normaluser

When you are prompted to enter your password then type your password. And this will be the next code that you need to enter:

sudo adduser normaluser sudo

With the command above, you had just given the user the sudo rights.

Congratulations for setting up your Ubuntu 12.04 (Linux) Operating System on your VPS. This procedure is actually applicable to any other version of Ubuntu.

No comments:

Post a Comment