Dan Brody Chief Information and Technology Officer CITO

A2 Hosting How To Upgrade to Ubuntu 16.04 LTS

logoI recently started using a virtual private server VPS over at A2-Hosting. I always seem to need a server to experiment with that behaves more like a bare-metal machine than a shared cloud server.

The A2-Hosting VPS come with different versions of Linux I chose Ubuntu 14.04 LTS wich is the most current version that A2 provides. My lab was to test the latest beta release of Microsoft SQL on Linux. MSSQL requires the latest version of Ubuntu 16.04 LTS and at least 4GB ram. So we need to upgrade from 14.04 to 16.04, here is how you do it.

The Ubuntu operating system's next Long Term Support release, version 16.04 (Xenial Xerus). First, let me say that you should do this on a clean VPS that has not been used for anything else yet.  Because we are on 14.04 we will have to go through two stage upgrade 14.04 -> 15.04 -> 16.04. Follow these steps and you will be fine.

Step 1 – Upgrade Currently Installed Packages to Wily 15.04

Note that you are login into the A2 VPS as root with information provided on the A2 Services Screen  [Portal Home / Client Area / My Products & Services / Product Details] Before beginning the release upgrade, it's safest to install the latest versions of all packages for the current release. Begin by updating the package list:

apt-get update

Next, upgrade installed packages to their latest available versions:

apt-get upgrade

You will be shown a list of upgrades and prompted to continue. Answer y for yes and press Enter.

This process may take some time. I am also partial to VIM editor but you can use the standard VI editor if you like. You will nee into install VIM if you would like to use it like me.

apt-get install VIM

Answer y for yes and press Enter.

I suggest before you change /etc/apt/sources.list file you make a backup

cp /etc/apt/sources.list /etc/apt/sources.list.old

Next, we will edit the file

vim /etc/apt/sources.list

We are going to change "trusty" to "wily"

deb http://archive.ubuntu.com/ubuntu wily main
deb http://archive.ubuntu.com/ubuntu wily-updates main
deb http://security.ubuntu.com/ubuntu wily-security main
deb http://archive.ubuntu.com/ubuntu wily universe
deb http://archive.ubuntu.com/ubuntu wily-updates universe
deb http://archive.canonical.com/ubuntu wily partner

Optional quick way in one-step search and replace

sed -i -e "s/trusty/wily/g" /etc/apt/sources.list

Next, we need to perfrom the upgrade you can do this in one line as bellow.

apt-get update && apt-get dist-upgrade

Step 2 – Upgrade Currently Installed Packages to Xenial 16.04

I suggest before you change /etc/apt/sources.list file you make a backup

cp /etc/apt/sources.list /etc/apt/sources.list.old2

Next, we will edit the file

vim /etc/apt/sources.list

We are going to change "wily" to "xenial"

deb http://archive.ubuntu.com/ubuntu xenial main
deb http://archive.ubuntu.com/ubuntu xenial-updates main
deb http://security.ubuntu.com/ubuntu xenial-security main
deb http://archive.ubuntu.com/ubuntu xenial universe
deb http://archive.ubuntu.com/ubuntu xenial-updates universe
deb http://archive.canonical.com/ubuntu xenial partner

Optional quick way in one-step search and replace

sed -i -e "s/wily/xenial/g" /etc/apt/sources.list

Next, we need to perform the upgrade you can do this in one line as bellow.

apt-get update && apt-get dist-upgrade

Step 3 – Post Upgrade Cleanup on Ubuntu Xenial 16.04

Now that we have completed the upgrades we will want to clean and remove unused packages.

 apt-get autoremove --purge -y;apt-get clean

That easy you can now install your software you want. In our case, we installed Microsoft MSSQL according to the instruction found here https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-ubuntu provided my Microsoft.

After you have installed the mssql server you should be able to run top to see details of the service running.

top

top-mssql-linux

 

%d bloggers like this: