Claremont, Cape Town, 7708
+27 87 265 9183

Easy Ubuntu server 18.04 LTS 64bit base install

Easy Ubuntu server 18.04 LTS 64bit base install

Easy Ubuntu server 18.04 LTS 64bit base install

Overview:

In this how-to we will be setting up an Ubuntu server 18.04 LTS 64bit base install with single partition and no LVM, to keep our servers lean and simple. (or partition to taste or requirement, swap, boot, var / log, home etc.)

Enable / install OpenSSH server only, minimal install no other packages or add-ons.
This will act as the base for all our systems and server installs with our tutorials unless specifically stating a different OS or version.

Lets get started:

Let us first download the ISO.
https://releases.ubuntu.com/18.04/
look for ubuntu-18.04.5-live-server-amd64.iso

The latest version at the time of writing is Ubuntu 20.04.1, we will be specifically using the older 18.04 LTS as its End of Standard Support will only be in April 2023 and end of life will be April 2028. We will release updated tutorials side by side in the future for Ubuntu 20.04.x

Once we have downloaded the ISO we have some choices to start.
We can burn the image to DVD and install directly on a PC or Server via DVD-Rom (ok boomer…).
We can image / write it to USB drive (Thumb-drive / USB Key) and install directly on a PC or Server booting from the USB key..
We can run the ISO directly with one of our favourite free desktop virtualisation application, VirtualBox or VMware Workstation Player.
We can upload the ISO to our preferred Hypervisor, VMWare ESXi, Proxmox, Xen server etc
We will post howtos on setting up and running VMWare ESXi server and Proxmox for private or production use a bit later.

First we make some assumptions or set criteria.
This is the first server we are building so we can name it generically as server001.
We can then later in documentation say what it is running i.e. content filter, web host, SSL Proxy, API Gateway etc.
Or we could give it a descriptive name i.e. contentfilter001, webhost001, sslproxy001 etc.
I personally prefer picking colors and then naming the servers generically by shades i.e.:
Red
Barn
Cardinal
Carmine
Chili
Chocolate
Cinnabar

Installation:

After first boot from the install media you created, on the Welcome screen select your Language, in this case we are selecting English. (You can move the arrow keys up and down to select your preferred language.)
Then hit Enter.
You will now see Installer update available, with the arrow keys select Continue without updating and hit Enter. (We will cover updating and upgrading later and as needed.)

On the next Menu, Keyboard configuration, use your TAB key to and select Layout: here you can select your keyboard layout, for this example we will select English (South African) by using your arrow keys, please select the layout that matches your keyboard layout or location.

Now hit Enter, use your TAB key again to select DONE and then hit Enter again.

On the next section Network connections, you can manually assign a static IP address or leave it as is for now as DHCP, we will release a how-to on how to change your network settings via console / terminal. Select DONE and hit Enter.

Next section Configure Proxy, you can leave blank unless you have a proxy server then please fill out the required address, if not just skip by hitting Enter.

For the section Configure Ubuntu archive mirror, you can just hit enter again.

Under the section Guided storage configuration, assuming this is a dedicated install on dedicated hardware or a dedicated virtual machine or container.

NB!! Please note ALL data will be lost on the drive or drives in the next step depending on how you wish to map (or not) your partitions / partition table.

For our example we will select Use entire disk marked with an X, we will use our TAB key or arrow keys to move down to Set up this disk as an LVM group and disable LVM by pressing the space-bar on our keyboard this will remove the X from Set up this disk as an LVM group, now TAB down or move down with arrow keys to Done and hit Enter. (We will cover partitioning and advanced partitioning and reasoning in a future how-to / tutorial)

Optional – LVM and Encryption:
If you want LVM and Encryption you can just leave Set up this disk as an LVM group enabled with the X, and with your TAB key or arrow keys select Encrypt the LVM group with LUKS, Use your TAB key or arrow keys to now move to the Passphrase: box enter your secure passphrase, then TAB or move with arrow keys to Confirm passphrase:.

To note you will need to enter the passphrase after every reboot / boot up / startup.

This will now Display the changes and selected configuration.
You can now hit Enter again to continue.
It will ask you to “Confirm destructive action” you can now use your TAB key or arrow keys again to move to Continue and then press Enter.
Now Enter your name: i.e.
(use tour TAB key or arrow keys to move between options / selections.)
Joe Soap, Administrator, Admin etc. (It is best to use your real name if you work in a team or as an easy way to distinguish between system and real users.)

Your server’s name: server001
Pick a username: Here you can use your first-name or again just admin or administrator.
Now create your password and confirm it then move to Done and hit Enter.
On the next screen, SSH Setup, enable Install OpenSSH server by pressing space bar.

Skip / leave Import SSH identity: on No.
Now Tab / or move with your arrow keys down to Done and hit Enter.

We will generate and import SSH Keys later in another How-to / Tutorial, you can find that here: Simple SSH password-less logins.

Under the next section, Featured Server Snaps, leave everything un-selected by just pressing your TAB key selecting Done and hitting Enter. (If you accidentally enabled anything, you can disable it by using your TAB and arrow keys and space bar to disable or enable Snaps.)

The installation will now start.

Once the install is done it will ask you to Reboot, you can hit Enter here to continue.

On the next step, you will see a message that says “Please remove the installation medium, then press ENTER:” you can now eject the disk (if you burnt it to DBD and used a rom), unplug the USB Key or unmount the ISO, depending what method you chose for the install.
In my case I used Virtualbox and therefore I can just hit enter to continue.

If you enabled LVM and Encryption you will have to enter your passphrase directly after reboot / boot up, you will be asked, Please unlock disk dm_crypt-0, now type in the passphrase and hit Enter.

After the first boot you may see some Random code (SSH Host keys) you can ignore this, or you will see:
Ubuntu 18.04.5 LTS YOUR_SERVERS_NAME tty1
YOUR_SERVERS_NAME

In our example:
Ubuntu 18.04.5 LTS server001 tty1
server001 login:

You can now log in using the username and password you created earlier, once logged in for fun type in htop and hit Enter, this will show you real-time statistics about your new server and running service’s, press f10 on your keyboard to exit htop.

Document your username and password as well as server-name for future use so that you do not forget it and if you assigned a static IP include this in the file, this can just be a plain text file i.e. notepad on Windows.

Congratulations your first Ubuntu server is ready!

Fin

Leave a Reply