Ubuntu 16.04 Minimal Server Install.

This post will, quickly, run through how to create a Minimal Server Install using Ubuntu 16.04. It also only takes a short time, taking between 7 to 20 minutes to install depending on your hardware and the number of times you have run through it. I find it an ideal way to try out and learn how to install Ubuntu in various configurations. I also use a virtual machine running on Virtualbox as this allows me to throw it away without messing about with real hardware.

The virtualbox configuration I will be using is:

  • Type: Linux
  • Version: Ubuntu (64-bit)
  • Memory Size: 1Gb
  • Hard disk: 8Gb Dynamic
  • Processor: 2
  • Network: Bridged Adaptor
  • Boot Source: ubuntu-16.06-server-amd.iso

I use a minimal Server Install as the basis of nearly all my guides as that is what I start out with use when creating new machines.

we will then have a known starting place and a good foundation when playing around with different installation types. It is generally simple to add extra functionality and services to it.

Choose the language you want to use for the installation GUI.

02_ubuntu1604_choose_language

Then select that you want to install Ubuntu.

04_ubuntu1604_install_type

Choose the language that will be installed

06_buntu1604_install_language

Select your location

08_ubuntu1604_select_location

I select No at the Detect keyboard option as I am using a UK keyboard and it is simpler to select the options from the next few screens.

10_ubuntu1604_detect_keyboard

12_ubuntu1604_country_origin

14_ubuntu1604_keyboard_layout

Add a host name, I tend to use a name to remind me what I an doing with the machine. So for this post I will use test-server.

16_ubuntu1604_add_hostname

Add a default user, I use fred as it is simple to type 🙂

18_ubuntu1604_full_user_name

20_ubuntu1604_account_name

Add a password for the user. Something simple as this is a test machine and we will mostlikly be typing it a lot while experimenting.

22_ubuntu1604_password1

24_ubuntu1604_password2

No point encrypting the users home director with this install. But something you could try out later on.

26_ubuntu1604_encrypt_home_dir

Set the time zone. This is the time zone you want to be displayed by the new server. For me it usually defaults to the right one. It is not the time zone it will use internally. Linux uses GMT/UTC for that by default.

28_ubuntu1604_time_zone

Disk partitions. If this is not the fist time you are doing an installation on a disk you will see the next screen. The first time through it does not appear.

29_ubuntu1604_unmount_disks

I normally use Guided – Use entire disk when experimenting. But this is an area you will want to spend some time playing around with and trying out different combinations. The two screen prints below show the differences between a new disk and a disk with an OS on already.

30_ubuntu1604_disk_partition1

31_ubuntu1604_disk_partition2

On the virtual disk I am using there is only one disk. So not much to do here.

32_ubuntu1604_partition_disk

Write the changes to the disk.

34_ubuntu1604_write_disk_changes

The next bit takes a minute or so to partition and format the disk and then install an initial boot system, before moving on to installing the actual software we want.

We will be installing from the iso or DVD so there will not be a HTTP proxy to configure.

36_ubuntu1604_http_proxy

What type of update are we going to allow the system to use.

38_ubuntu1604_updates

Tnhe select the initial packages. I only select standard system utilities and OpenSSH server.. This gives the minimum you can use for most occasions and then just add the extra services or functionality as you require it using apt-get.

40_ubuntu1604_initial_packages

There is a longer pause here as the minimal server is installed and configured.

You will definitely want GRUB installed or your Minimal server install will not boot. 🙂

42_ubuntu1604_grub

One more little pause while some services get configured. Then the installation is complete and ready to be booted the first time.

44_ubuntu1604_install_complete

Once rebooted you can update ALL the software with the usual commands:

sudo apt-get update
sudo apt-get dist-upgrade

The update will be pretty quick less than 5 minutes in all and it will update all the software to the latest in one go. There is No multiple checking and installing, configuring and rebooting.

That is all there is to a Minimal Server Install. It should use about 1.4 GB of the 8GB storage we allocated on the virtual machine. This is far quicker and simpler than installing Microsoft Windows. Windows can take hours to do the initial update 🙁

Adding MATE

If you would like to convert this minimal server into a desktop with MATE. Just add the following:

sudo apt-get install mate-desktop-environment-extras mate-themes \
             lightdm lightdm-gtk-greeter ubuntu-artwork update-manager

One last tweak and we can reboot. Create the lightdm config file /etc/lightdm/lightdm.conf with the following two lines under the heading [SeatDefaults]. This will give you a basic login/greeter for your desktop.

sudo nano /etc/lightdm/lightdm.conf
[SeatDefaults]
greeter-session=lightdm-gtk-greeter
user-session=mate

If you want to enable automatic logins for a user you can also add the lines that start auto login, adjust the to be your own user name. The resulting file contents should be

[SeatDefaults]
greeter-session=lightdm-gtk-greeter
user-session=mate
autologin-user=
autologin-user-timeout=0

Once that is finished you can reboot and you will be presented with a graphical login prompt or automatically logged in depending on what you setup.

Fix for GVIM

If like me you also use gvim when you run it from the terminal you will see warning about a number of packages missing.

Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"
Gtk-Message: Failed to load module "topmenu-gtk-module"

You can remove these messages by installing the following:

sudo apt-get install libatk-adaptor libgail-common topmenu-gtk2 \
     libtopmenu-client-gtk2-0 libtopmenu-server-gtk2-0 libtopmenu-client-gtk2-0 \
     topmenu-gtk3 libtopmenu-client-gtk3-0 libtopmenu-server-gtk3-0 \
     libtopmenu-client-gtk3-0

4 thoughts on “Ubuntu 16.04 Minimal Server Install.

  1. Torbuck

    Hi there….great posts I must say.

    I have one question that you may be able to help me with. I have just rebuilt from scratch a Ubuntu server that I use mainly as a media server. I have installed Ubuntu Server 16.04.2 LTS. In my previous setup, I had a minimal Gnome desktop installed that was handy to use in certain scenarios.

    I am interested in doing the same for Mate, since Mate is essentially replacing Gnome. Any chance you can direct me to how to add a minimal Mate desktop to my Ubuntu server, and force Ubuntu boot into terminal by default.

    Thanks!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *