Ubuntu Server

Install Ubuntu Server 16.04 LTS

Installing Ubuntu Server 16.04 LTS


Ubuntu Server 16.04 LTS is the latest server edition that has the Long Term Support (supported for a minimum of 3 years). The installation method for Ubuntu Server is quite different from that of the desktop editions. Ubuntu Server is installed from a a text based installation interface as opposed to the traditional Graphical User Interface. By default, Ubuntu server does not have a graphical desktop, however, this can be installed as an option. The Ubuntu Server edition is mainly aimed at the Enterprise/Data Centres, however, it is ideal for a home backup server solution and media server. During the installation of Ubuntu Server you can choose from various server roles and packages to install. To download the Ubuntu Server 16.04 LTS (Xenial Xerus) simply click on the link: Download Ubuntu Server 16.04 LTS

Once you have downloaded the "iso" image, you will need to burn this to a DVD. For software that can achieve this, simply search for "dvd iso burning software" in the search box above. Your system may already have CD/DVD burning software such as "Brasero, K3B, Nero, CDBurnerXP or Roxio". Once you have burned your chosen "iso" image of Ubuntu Server to your DVD, you will place the disk in the target system and then reboot this system . As your system reboots, you will need to press the appropriate key to access your system's BIOS settings. On many systems this key will be "F8", "F11" or "F12". Most systems will display the a message indicating which key needs to be pressed. Once you have access to your BIOS settings, you will need to modify the boot order of your system to boot from CD/DVD first. Once you have made this change, you can reboot your system and follow the Instructions below. If you are installing into a Virtualized Environment Like VMWare or Oracle VM, simply copy the iso image to the relevant system folder.



Use the arrow keys and Tab key to Navigate various selections. The Space Bar may also be used to toggle selections on or off. Once a selection has been highlighted, press the "enter" key to confirm your chosen option.


Select Language for your Installation


Highlight your chosen language for the installation of Ubuntu Server 16.04 LTS. In this example below, "English" has been chosen.


Ubuntu Server 16.04 LTS Language Selection

Install Ubuntu Server Screen


At this screen you must choose the option "Install Ubuntu Server".


Ubuntu Server 16.04 Install Screen

Choose Installation Language


Select the Language you wish to use for this installation of Ubuntu Server. In this example "English"


Ubuntu Server 16.04 LTS - Select your Language

Choose your Location


Select your current location. This will be used for setting your system time zone and your system locale settings. In the example "United Kingdom" has been selected. If your location is not listed, then choose the option "other.


Ubuntu Server language Selection Screen

Configuring the Keyboard


From this screen you will need to select your keyboard settings. The system can try and automatically detect your keyboard settings, however, it is often easier to select "No" and choose your settings from the menu listing. In this example, I have chosen to manually select the keyboard settings from the list provided.


Ubuntu Server 16.04 LTS Keyboard Settings

Configure the Keyboard Manually


At this screen, select the country of origin for your computer. In this example I have chosen "English (UK).


Ubuntu Server 16.04 LTS Manually selecting keyboard

Keyboard Layout


Please select the layout that matches your keyboard. In this example I have gone with "English (UK)".

Ubuntu Server 16.04 LTS - Keyboard Layout

Configuring the Network with DHCP


The next phase automatically loads additional components and will try to configure your network if you have an available DHCP server. Once the server has successfully configured your system using DHCP you will be taken to a screen asking for a hostname to be provided (Unique name to identify your server on your network). If you do not want to configure a static IP address for your server, simply supply the hostname of the server and choose the option continue. For a Static IP address, follow the procedure below.


Ubuntu Server 16.04 LTS - Configuring the Network with DHCP

Configuring a Static IP Address


At the Hostname entry screen we are going to choose the option "Go Back. Once chosen, you will see various options available to you for the configuration of your network settings.


Ubuntu Server 16.04 LTS - Host Name Configuration

Configure Network Manually


At this screen, highlight the option "Configure network manually".


Ubuntu Server 16.04 LTS Configure network manually


Enter IP Address


At this screen you are required to enter the IP address you want to assign to your server. In the example the IPV4 address 192.168.0.71 has been used. You may also use an IPV6 format address.


Ubuntu Server 16.04 LTS Static IP Address

Enter Netmask


At this screen you must enter the Netmask information for your system. In the example I am using the netmask "255.255.255.0" If you do not know your netmask, this information can be provided by your networking team.


Ubuntu Server 16.04 LTS - Netmask

Enter Gateway IP Address


At this screen you must enter the Gateway IP address. In the example I am using the Gateway IP address of "192.168.0.1".


Ubuntu Server 16.04 LTS - Gateway IP Address

Enter Nameserver IP Address


At this screen you must enter the IP addresses of the nameserver(s) that are used on your network. These servers are used to lookup hostnames on your network. You may enter up to 3 IP addresses separated by a space. In the example, I am using the nameserver address of "192.168.0.1".


Ubuntu Server 16.04 LTS - Nameserver IP Address

Enter Hostname


You should now be back at the hostname entry screen. Here you must provide a unique name to identify your server on your network. In the example, I have chosen the hostname "ubuntusrv01".


Ubuntu Server 16.04 LTS - Hostname

Enter Domain Name


The domain name is part of your internet address to the right of your hostname, this often ends in .com, .edu. .org. If you are setting this server up at home, you may create create your own domain name. In the example, I have used "home.local".


Ubuntu Server 16.04 LTS - Domain Name

Create a User - Enter Name


At this screen you must provide the real name of a user that will be used on your system. In the example I have used my name "john".


Ubuntu Server 16.04 LTS - Your Name

Enter username


At this screen you must provide the username that is associated with the entry above. In this example I have used my name "john".


Ubuntu Server 16.04 LTS - User Name

Enter Password


At this screen you must provide a password to be used with your account. If you wish to see the password information you are typing in, you may select the "Show Password" option by highlighting the option and then toggling the option "on" or "off" with the space bar. You will be asked to confirm the password a second time.


Ubuntu Server 16.04 LTS - Enter Password

Encryption


At this point of the installation, you have the option of encrypting your home directory. In this example I have chosen the option not to use encryption "No.


Ubuntu Server 16.04 LTS - Encryption

Configure the Clock


From this screen you need to confirm that the correct "Time Zone" information is displayed correctly. In this example "Europe/London". If the displayed time zone information is not correct, you may select the correct one from a list of available time zones.


Ubuntu Server 16.04 LTS - Time Zone

Partitioning your Disks


At this screen you can choose which options to use for "Disk Partitioning". In this particular exercise we are going to choose the option to "Manually" configure our disks. You will be initially presented with an option screen. You may choose to have your disk partitioned automatically by choosing one of the first three options, however, we are going to use the option Manual.


Ubuntu Server 16.04 LTS - Manual Partitioning of Disk

Partitioning Scheme


Before you manually partition your disks, it is always a good idea to plan what sizes and file systems you are going to be using. In this example, I will be using a 20 GB disk. In a real working environment, you will probably require more storage space depending on the roll of the server. Below are the sizes that will be used for this example of manual partitioning. These sizes are provided only as a guide.


Mount Point VG Name LV Name Size
/boot Standard Partition - 500MB
/ sysVG rootLV 5000MB
swap sysVG swapLV 1000MB
/home sysVG homeLV 2000MB
/opt sysVG optLV 2000MB
/tmp sysVG tmpLV 1000MB
/var sysVG varLV 2000MB
/usr sysVG usrLV 3000MB
/spare sysVG spareLV 4974MB


Overview of Current Disk


This screen provides an overview of the current state of our disk(s). In this example, we have only a single disk which is 21.5 GB in size. The disk has the identifier (sda). To start work on our partitioning screen you must highlight the disk and then press enter.


Ubuntu Server 16.04 LTS - Manual Partitioning of Disk

Create New Empty Partition Table


At this screen you will see a message indicating that you have chosen an entire device to partition. Highlight the option Yes and then press enter.


Ubuntu Server 16.04 LTS - Create Partition Table

Partition Overview


At this screen you will see that 21.5 GB of space is now available for us to work with. Highlight this entry and press enter.


Ubuntu Server 16.04 LTS - FREE SPACE

Create a New Partition


At this screen you must choose the option "Create a new partition" and then press enter.


Ubuntu Server 16.04 LTS - Create New Partition

Specify Partition Size


From this screen you can see that there is a total of 21.5 GB of space available. However, we are going to create the "/boot" partition. The /boot partition only requires 512 MB of space.


Ubuntu Server 16.04 LTS - Boot Partition Size

Partition Type


At the next menu choose the option "Primary" for the partition type.


Ubuntu Server 16.04 LTS - Boot Partition type Primary

Location


At this next screen you have the option to specify where the new partition should be created. The options available are "Beginning" or "End". In this example we are going with the option "Beginning".


Ubuntu Server 16.04 LTS - Boot Partition Location

Select Mount Point


At this screen we need to select the option"Mount point:" Once selected, press enter. You will be taken to an additional screen where you can select the correct mount point for our "/boot" partition.


Ubuntu Server 16.04 LTS - Boot Modify Mount Point

Select /boot Mount Point


As the partition we are creating is "/boot", we have to choose the mount point /boot.


Ubuntu Server 16.04 LTS - Boot Modify Mount Point

Boot Flag and Filesystem Type


At this screen we must now set the bootable flag to "On". To do this highlight the option "Bootable flag:" and press enter. The value should now say "On".

The default file system of "ext4" has been chosen. If you wish to change this, then press enter to see the available options.

Your screen should now look similar to the one below. To finalise your choices, highlight the option "Done setting up the partition".


Ubuntu Server 16.04 LTS - Boot Modify Mount Point

Configure the Logical Volume Manager


From this screen choose the option to configure the "Logical Volume Manager".


Ubuntu Server 16.04 LTS - Configuring LVM

Configuring the Logical Volume Manager


Before the Logical Volume Manger can be configured, we need to write out the current configuration to disk. Highlight the option "Yes" and press enter.


Ubuntu Server 16.04 LTS - Configuring LVM

Create volume group


At this next screen you will see a summary of your LVM configuration. From this menu, select the option "Create volume group".


Ubuntu Server 16.04 LTS - Configuring LVM

Enter Volume Group Name


At this screen you must specify the Volume Group name to be used. In the example I have used "sysVG".


Ubuntu Server 16.04 LTS - Configuring LVM

Select Device for New Volume Group


At this screen you must select the option "/dev/sda free #1". Highlight this option and select by pressing the Space Bar.


Ubuntu Server 16.04 LTS - Configuring LVM

Write Changes to Disk


To continue configuring the Logical Volume Manager, you must select the option "Yes" to write the changes to disk.


Ubuntu Server 16.04 LTS - Configuring LVM

Create Logical Volume


The next step is to create our Logical Volumes. Highlight the option "Create logical volume" and press enter.


Ubuntu Server 16.04 LTS - Configuring LVM

Specify Volume Group


Select the Volume Group where the Logical Volume should be created. (sysVG)


Ubuntu Server 16.04 LTS - Configuring LVM

Enter Logical Volume Name


In this example I am creating the Logical Volume that will be used by the root filesystem. I have used the name "rootLV".


Ubuntu Server 16.04 LTS - Configuring LVM

Specify the size of Logical Volume


In this example I have specified 5000 MB of space to be used for the rootLV.


Ubuntu Server 16.04 LTS - Configuring LVM

Create Logical Volume


The next step is to create our next Logical Volume. Highlight the option "Create logical volume" and press enter.


Ubuntu Server 16.04 LTS - Configuring LVM

Specify Volume Group


Select the Volume Group where the Logical Volume should be created. (sysVG)


Ubuntu Server 16.04 LTS - Configuring LVM

Enter Logical Volume Name


In this example I am creating the Swap Logical Volume that will be used by the system for swap space. I have used the name "swapLV".


Ubuntu Server 16.04 LTS - Configuring LVM

Specify the size of Logical Volume


In this example I have specified 1000 MB of space to be used for the swapLV. Generally as a rule of thumb, the swap space is created as half the size of the physical memory available on a system.


Ubuntu Server 16.04 LTS - Configuring LVM

Create Logical Volume


The next step is to create our next Logical Volume. Highlight the option "Create logical volume" and press enter.


Ubuntu Server 16.04 LTS - Configuring LVM

Specify Volume Group


Select the Volume Group where the Logical Volume should be created. (sysVG)


Ubuntu Server 16.04 LTS - Configuring LVM

Enter Logical Volume Name


In this example I am creating the home Logical Volume. I have used the name "homeLV".


Ubuntu Server 16.04 LTS - Configuring LVM

Specify the size of Logical Volume


In this example I have specified 2000 MB of space to be used for the homeLV. This space will be used for the home area of all users on your system. If there are to be many users of your system, then this area will need to be sized accordingly.


Ubuntu Server 16.04 LTS - Configuring LVM

Create Logical Volume


The next step is to create our next Logical Volume. Highlight the option "Create logical volume" and press enter.


Ubuntu Server 16.04 LTS - Configuring LVM

Specify Volume Group


Select the Volume Group where the Logical Volume should be created. (sysVG)


Ubuntu Server 16.04 LTS - Configuring LVM

Enter Logical Volume Name


In this example I am creating the opt Logical Volume. I have used the name "optLV".


Ubuntu Server 16.04 LTS - Configuring LVM

Specify the size of Logical Volume


In this example I have specified 2000 MB of space to be used for the optLV.


Ubuntu Server 16.04 LTS - Configuring LVM

Create Logical Volume


The next step is to create our next Logical Volume. Highlight the option "Create logical volume" and press enter.


Ubuntu Server 16.04 LTS - Configuring LVM

Specify Volume Group


Select the Volume Group where the Logical Volume should be created. (sysVG)


Ubuntu Server 16.04 LTS - Configuring LVM

Enter Logical Volume Name


In this example I am creating the tmp Logical Volume. I have used the name "tmpLV".


Ubuntu Server 16.04 LTS - Configuring LVM

Specify the size of Logical Volume


In this example I have specified 1000 MB of space to be used for the tmpLV.


Ubuntu Server 16.04 LTS - Configuring LVM

Create Logical Volume


The next step is to create our next Logical Volume. Highlight the option "Create logical volume" and press enter.


Ubuntu Server 16.04 LTS - Configuring LVM

Specify Volume Group


Select the Volume Group where the Logical Volume should be created. (sysVG)


Ubuntu Server 16.04 LTS - Configuring LVM

Enter Logical Volume Name


In this example I am creating the var Logical Volume. I have used the name "varLV".


Ubuntu Server 16.04 LTS - Configuring LVM

Specify the size of Logical Volume


In this example I have specified 2000 MB of space to be used for the varLV.


Ubuntu Server 16.04 LTS - Configuring LVM

Create Logical Volume


The next step is to create our next Logical Volume. Highlight the option "Create logical volume" and press enter.


Ubuntu Server 16.04 LTS - Configuring LVM

Specify Volume Group


Select the Volume Group where the Logical Volume should be created. (sysVG)


Ubuntu Server 16.04 LTS - Configuring LVM

Enter Logical Volume Name


In this example I am creating the usr Logical Volume. I have used the name "usrLV".


Ubuntu Server 16.04 LTS - Configuring LVM

Specify the size of Logical Volume


In this example I have specified 3000 MB of space to be used for the usrLV.


Ubuntu Server 16.04 LTS - Configuring LVM

Create Logical Volume


The next step is to create our next Logical Volume. Highlight the option "Create logical volume" and press enter.


Ubuntu Server 16.04 LTS - Configuring LVM

Specify Volume Group


Select the Volume Group where the Logical Volume should be created. (sysVG)


Ubuntu Server 16.04 LTS - Configuring LVM

Enter Logical Volume Name


In this example I am creating the spare Logical Volume. I have used the name "spareLV".


Ubuntu Server 16.04 LTS - Configuring LVM

Specify the size of Logical Volume


In this example I have specified 4974 MB of space to be used for the spareLV. (This is all the remaining space on my disk)


Ubuntu Server 16.04 LTS - Configuring LVM

Display Configuration Details


If we choose the option "Display configuration details" then our current LVM set-up will be displayed as below:


Ubuntu Server 16.04 LTS - LVM Overview

Current LVM configuration



Ubuntu Server 16.04 LTS - LVM Overview

Finish LVM


To continue configuring our disks, we need to select the option "Finish.


Ubuntu Server 16.04 LTS - LVM Overview

Overview of partitions and mount points


Next we are going to specify the mount points and filesystem types for our Logical Volumes that we have created on the Volume Group "sysVG".


Ubuntu Server 16.04 LTS - LVM Overview

Select the Logical Volume


In this example we are working with the Logical Volume "homeLV". Highlight the option as per the image below and press enter


Ubuntu Server 16.04 LTS - Add Mounts to LV homeLV

Specifying Mount Point and File System Types


The next steps involve selecting the logical volume and adding a file system type and mount point. The example below will take you through the basic steps.

These steps will need to be repeated for the following entries: rootLV, optLV, tmpLV, usrLV and varLV

The following Logical Volumes will require a few additional steps: swapLV and spareLV. Separate instructions have been included for these Logical Volumes.



Select the Logical Volume


Highlight the option as per the image below and press enter. We are going to specify the filesystem type to use with this Logical Volume.


Ubuntu Server 16.04 LTS - Add Mounts to LV homeLV

Select File System Type


We will now choose the option "Ext4".


Ubuntu Server 16.04 LTS - Add Mounts to LV homeLV

Select Mount Point


As we are working with the homeLV, we are going to use the mount point of /home.


Ubuntu Server 16.04 LTS - Add Mounts to LV homeLV

Finish Partition


Once we have configured the mount point and the file system type, we can now click on the "Done setting up partition.


Ubuntu Server 16.04 LTS - Done setting up partition

Swap Partition


As I mentioned earlier, the swapLV is treated slightly differently as it is a storage area used by the system. To configure the swapLV, highlight the entry as we did previously for the homeLV partition and then press enter


Ubuntu Server 16.04 LTS - Done setting up partition

Swap Partition


Highlight the option"Use as:" and press enter. A menu will now appear with mount options.


Ubuntu Server 16.04 LTS - Done setting up partition

Swap Partition


Highlight the option"swap area" and press enter.


Ubuntu Server 16.04 LTS - Done setting up partition

Finish Swap Partition


Highlight the option"Done setting up partition" and press enter.


Ubuntu Server 16.04 LTS - Done setting up swap partition

Add Mount Points to spareLV


As I mentioned earlier, the Logical Volume spareLV is treated slightly differently as it is not a system file system and by default will not have an option to choose from for a standard mount point. Where you are creating a non system filesystem, you will need to manually specify the mount point.

First we choose the spareLV from the overview screen and press enter.


Ubuntu Server 16.04 LTS - Done setting up swap partition

Add Mount Points to spareLV


Select the option "Use as: and then press enter.


Ubuntu Server 16.04 LTS - Done setting up swap partition

Select File System type for spareLV


Select the option "Ext4 and then press enter.


Ubuntu Server 16.04 LTS - Done setting up swap partition

Select Mount Point


Select the option "Mount Point: and then press enter.


Ubuntu Server 16.04 LTS - Done setting up swap partition

Select Manual Mount Point


Select the option "Enter manually and then press enter.


Ubuntu Server 16.04 LTS - Done setting up swap partition

Type Mount Point


Type the mount point that is to be used for the Logical Volume. In this example I have chosen the name "/spare".


Ubuntu Server 16.04 LTS - Done setting up swap partition

Finish Spare Partition


You should now see a screen similar to the one below. Highlight the option "Done setting up partition" and press enter.


Ubuntu Server 16.04 LTS - Done setting up swap partition

Finish Partitioning


You should now see a screen similar to the one below. Highlight the option "Finish partitioning and write changes to disk" and press enter.


Ubuntu Server 16.04 LTS - Done setting up swap partition

Confirm Changes


Now select the option "Yes" to write your changes to disk.


Ubuntu Server 16.04 LTS - Done setting up swap partition

System is now Installing


No further action is required at this point.


Ubuntu Server 16.04 LTS - System Installs

Http Proxy Access


If you need to configure an entry for access to the outside world via a proxy server, then you can enter your details below. Otherwise, leave this entry blank.


Ubuntu Server 16.04 LTS - HTTP Proxy Entry

Managing Updates


At the next screen you have the option of selecting whether you want to install security updates automatically or manage your system with "Landscape". In the example below, I have chosen the option of "No automatic Updates".


Ubuntu Server 16.04 LTS - HTTP Proxy Entry

Software to Install


At the moment, only the basic core components of your system have been installed. You can select further components to be installed by highlighting the entry and pressing the space bar. I have chosen the additional option of openSSH server as this will allow you to connect to your server from remote locations using ssh.


Ubuntu Server 16.04 LTS - Install Software

Install GRUB


Confirm the installation of GRUB. Select the option "Yes" and press enter.


Ubuntu Server 16.04 LTS - Install Software

Installation Complete


Congratulations, your installation is now complete, you will now need to reboot your system. Remove any media from your systems drives.


Ubuntu Server 16.04 LTS - Installation Complete

Login


To login to your system you will need to use the user you created in the earlier steps. If you require to run a command as the "root" user, you will need to precede the command with "sudo".

By issuing the df-hT command we can see the file systems that we specified in the previous steps.

We can also issue the command ip a s to display our statically assigned IP address.

If you need to amend the IP address of your server or change any of the entries that we configured for your network. These can be changed by editing the "/etc/network/interfaces" file.

The amount of swap space can be viewed by issuing the command "free -m"



john@ubuntusrv01:~$ df -hT
Filesystem                Type      Size  Used Avail Use% Mounted on
udev                      devtmpfs  982M     0  982M   0% /dev
tmpfs                     tmpfs     201M  3.3M  197M   2% /run
/dev/mapper/sysVG-rootLV  ext4      4.5G  418M  3.9G  10% /
/dev/mapper/sysVG-usrLV   ext4      2.7G  562M  2.0G  22% /usr
tmpfs                     tmpfs    1001M     0 1001M   0% /dev/shm
tmpfs                     tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                     tmpfs    1001M     0 1001M   0% /sys/fs/cgroup
/dev/mapper/sysVG-varLV   ext4      1.8G  274M  1.5G  16% /var
/dev/mapper/sysVG-homeLV  ext4      1.8G  2.9M  1.7G   1% /home
/dev/sda1                 ext4      464M   55M  381M  13% /boot
/dev/mapper/sysVG-spareLV ext4      4.5G  9.3M  4.2G   1% /spare
/dev/mapper/sysVG-tmpLV   ext4      922M  1.2M  857M   1% /tmp
/dev/mapper/sysVG-optLV   ext4      1.8G  2.8M  1.7G   1% /opt
tmpfs                     tmpfs     201M     0  201M   0% /run/user/1000

john@ubuntusrv01:~$ ip a s
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3:  mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:69:1e:a6 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.71/24 brd 192.168.0.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe69:1ea6/64 scope link 
       valid_lft forever preferred_lft forever

john@ubuntusrv01:~$ free -m
              total        used        free      shared  buff/cache   available
Mem:           2000          34        1621           3         345        1926
Swap:           951           0         951