Wednesday, November 12, 2014

Ubuntu 14.04 Server Install Guide

While this post is about how to install Ubuntu 14.04 Server, this is only the beginning of the journey.  The focus of this site will be all about Odoo and how to set it up and use it with real world examples. However, in order to get Odoo up and running you must an operating system for this task I chose Ubuntu 14.04 Server.

So lets begin.  You can install via CD or from USB Flash Drive.  I actually installed via an ISO on my KVM deployment.  I will do a post later on my lab systems and KVM deployment at a later date.

So after you get your CD/USB Flash or ISO ready you can boot the system.

Initially you will get the following your Language and press Enter on your keyboard.  Note this Language selection is for the installer ONLY.  You will have to select the Language later that you will use on the system once it has been installed.

Next you will begin the actual install of the server.  Install Ubuntu Server is selected by default so all you have to do is press Enter your keyboard.

Now you will select the language that you want to use once everything has been installed. In my case it was English so I pressed Enter on the keyboard.

You will now need to select your location as in my case since I am located in the United States that is my default, I only have to hit Enter on the keyboard.

The next task to select the keyboard.  While I have tried to do the "Detect Keyboard Layout" a few times.  I honestly have better luck selecting No here and pressing Enter on the Keyboard.

If I had selected "Yes" on the prior screen you get a screen that asks you to press several characters so it can magically detect your keyboard.  In my case I selected "No" and you see that English (US) is selected by default, so all I have to do is press Enter on my keyboard.

This next step is easy since English is selected already just press Enter on your keyboard..If you need to change the keyboard use your arrow keys to find the right one and then press Enter on your keyboard.

Now it is time for you to chose a hostname.  I would recommend making it something you will remember easily.  If you or you company have a specific naming convention then use that.  Enter your hostname and press Enter on your keyboard.  Notice I entered odoov8 as we will be working with Odoo version 8 as we continue on this least until the next version is released.

Create a user on the system that will be used for logging in and administering the system, installing patches and applications.  As you can see I used my name.  When finished press Enter on your keyboard.

Now that you have setup the name, it is time to setup the login information.  By default some variant of your actual name is chosen. I typically use something totally different.  You will want to use something you will remember as this is username will be used for logging into the system each time.  Once you have entered your username press Enter on your keyboard.

You need to select a secure password for your username.  It is recommended you use a combination of letters, numbers, uppercase, and some non-alphanumeric characters.  You will need to make sure it is something you can easily remember.  Do not use something that can easily be traced to you, like your birthday, spouses, kids or pet names.  I have recommended for years that think of a sentence, a poem, something that has meaning to you that no one else knows and pick from that to build your password.  You could pick the first character from each work in a poem and change a couple letters to upper or lower case and maybe even numbers while adding some type of punctuation at the end or beginning.  When finished with your password press Enter on your keyboard.

Now it is time to retype your password. Don't worry if you typed it wrong either in this area or the previous as you will be given the chance to type it correctly if they do not match.  Now that being said I have typed my password wrong twice more than once and ended up not being able to log into the system after install.  I know I am not the only one who has ever done that..but maybe the first to actually admit it publicly.  When finished press Enter on the keyboard.

You are now given the opportunity to encrypt your home directory.  Since this is on a server and that there is no critical data that will be located in my user directory I selected no.  If you are installing this on a laptop or desktop I would probably recommend encrypting your home drive just in case the machine gets stolen.  No is the default so just press Enter on the keyboard.

Time to configure the clock...yes I did do that on purpose :).  The system attempts to find your correct time zone.  In my case it was correct and "Yes" was selected so I pressed Enter on the keyboard.  If it is not correct then Select No and you will be given an option to choose your time zone manually.

Next is time for you to partition the hard drive.  I chose the default here so I used pressed Enter on the keyboard.  If you have experience with partitioning UNIX type systems and you want to customize this you can.  LVM gives you the ability to grow the partitions later if you want and there are other features outside of this article that can be addresses later if you are interested.

Choose the disk you wish to partition.  In my case I only have one drive.  If you only have one then press Enter on your keyboard.  If you have more than one then make sure you choose wisely :)

You will want to write the partition to disk..otherwise you wont really get too far.  Using the arrow keys move the Highlighted area to Yes and press Enter on the keyboard.

You have now setup LVM on the begins actually partitioning the operating system (OS) for installation.  I chose the entire disk, you can choose to do less but in this case it was not necessary. Press Enter on the keyboard to go onto the next screen.

Since all the partition is done of the OS you now need to write it to disk as well. The default is No so you will need to move the highlighted area to Yes and then press Enter on the keyboard.

If you have a proxy then you will want to enter the proxy information here in my case for my lab I dod not have a proxy so I just left this area blank and guess what...yes I pressed Enter on the keyboard.

While I am huge advocate for keeping your system patched for any type of server I want to control that.  If you are deploying this in your company then you probably have some type of change control procedures.  By default No automatic updates is selected. If you have purchased Lanscape then you can manage it with your Lanscape account.  I would NOT choose to Install Security Updates Automatically for production servers or even development, QA or testing environments.  Since you are dealing with a server you will want to control what is installed and when.  That way when you install applications on top of your operating system it is easier to troubleshoot if something breaks.

I typically do not select anything here expect for OpenSSH Server.  I want to manually install all other applications that what I can see exactly what gets installed.  Once you have selected OpenSSH Server using the space bar you can use the tab key to move the highlighted area to Continue and then press Enter on your keyboard.

You need to install GRUB boot loader on the hard disk.  This allows the Master Boot Record (MBR) to know where your OS is located on the drive.  If you are familiar with Windows it automatically does this for you and does not give you options. Later if you have multiple drives you can actually use GRUB to boot to multiple different OSes.  For now make sure Yes is selected and press Enter on your keyboard.

Installation finished.  Press Enter on the keyboard.  Your machine will reboot at this time.  You will need to ensure that you have removed your media from the machine so it will boot to your new Ubuntu 14.04 server install.  If you don't remove the medial you can scroll to the top of these instructions and start from the beginning.

The moment of truth...time to login.  Using the Username and password you created earlier during the installation process log into the system.

If you successfully logged in then your screen should look something like the one below.  It gives you system information like disk and memory usage.  How many processes being used an number of logged in users (since this is a server and you just installed the OS hopefully you don't see users logged in).  More importantly is what needs to be updated.  Your update numbers may look different from mine based on when you install your Ubuntu Server.

It is time to update your package list. Doing this will allow the system to know about all the items that need to be updated.  You will want to do this on a regular basis to ensure you are up to date.  Again if you have some type of change control process in place follow your process. To get the update information type

sudo apt-get update

You will be prompted for YOUR password...the one you used to log into the system a few minutes ago. Let me break down this command for those of you who don't quite understand.  When you log into the system you logged in as your user account.  However in order to do administrative tasks you have to do them as a priveleged user.  On Windows that is typically called Administrator.  On UNIX and Linux systems such as Ubuntu Server the admin user is root.  But rather than having several people login as root and not really knowing who is doing what on the system it uses a command called sudo (short for superuser do).  In order to run commands via sudo you are required to enter your password.  This ensures that if you walk away from the server while still logged in...which you should never do btw.  Someone cannot do a admin level task without knowing your password.

Note this command will download information from the Internet so it make take a few minutes if your connection is slow.

You now have to enter YOUR password as explained above in order for the command to run.  Again it make take a few minutes to run if your connection is slow.

Now it it time it is time to patch the system by upgrading the packages that are out of date.  In the command below I chose to run dist-upgrade which upgrade the entire Ubuntu Server including the kernel (I won't go into that today but will wait for another date...if you are interested in an article about the Linux kernel please let me know).  You can also just use upgrade (leaving off the dist-) and it will upgrade everything except the kernel. Since we have not installed any applications other than OpenSSH Server on this system it is a good time to upgrade the entire system.  So go ahead and type the following at the command line:

sudo apt-get dist-upgrade

Press Enter on the keyboard.

Now the system will check to see what needs to be upgraded and list it for you to see.  Sometimes you may not want to install everything based on an application you have installed that has a conflict with a newer version or only supports the current version of an application.  That being said I have never had an issue just accepting all the updates..but it is something to be aware of anyway.  All this being said hit Y on the keyboard to start the install and now you can wait.  This may take a while again depending on your internet speeds.  For me it takes about 6-8 minutes and I have a 10 Mb/s connection to the Internet.

Now if you log out (by typing logout) and logging back in you will notice that there are not updates or security updates that show up.

Congratulations you have successfully installed Ubuntu 14.04 Server on your system.  You should also testing logging in via SSH. If you are still logged in you can run the command.  Notice this time when you logged in it has your IP address listed.

In order to SSH to your box you will need to have an SSH client installed.  Most Linux and OS X systems come with an SSH client. If you are on Windows you have a few options.  You can always use Putty which is free.  But my favorite is SecureCRT by Van Dyke Software.  I have been using SecureCRT since the late 90s and have always been impressed by the the package, support and features.

If you are able to successfully login via SSH across your network then pat yourself on the back. You also will want to give a warm thank you to your Enter key as it did got a good workout :)

Stay tuned for the next phase of this project coming next week which is how to install Odoo version 8 on your Ubuntu 14.04 Server.