The Ultimate Ubuntu Server Install 18.04LTS

From Scottworld
Jump to navigation Jump to search

Main Installation

The main installation is slightly different in 18.04LTS, insert the Ubuntu Server (LTS 18.04LTS Live) installation CD/USB/DVD and follow the onscreen instructions. You may need to make sure your USB key / USB slot supports EEFI boot, it seems there are some potential issues with non-eefi USB boots and a python error.

If you don’t understand the questions asked by the installer put the keyboard down and switch everything thing off and go back to being a user.

You will be asked to select.

Type of Ubuntu Install - Choose "Install Ubuntu"

Network Configuration: Use the cursor keys to configure the network interface with a static IP address. (set the IPv6 option to Do Not Use)

Internet Proxy: Set to whatever you user (none if you don't user one)

Disk Partitioning

When prompted choose

Use An Entire Disk

This will configure the system disk, with automatic boot / root / swap partitions. You can specify extra disks later and mount them if needed. You can also enter manual mode and select other disks and choose your mount points.

If you want to be safe, disconnect all disks apart from where you want the install, (then add them later)

root@solaris:/opt/mediawiki# lsblk

loop0    7:0    0  86.6M  1 loop /snap/core/4486
loop1    7:1    0  86.6M  1 loop /snap/core/4650
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0   512M  0 part /boot/efi
└─sda2   8:2    0 465.3G  0 part /
sdb      8:16   0   5.5T  0 disk
└─sdb1   8:17   0   5.5T  0 part /srv/data
sdc      8:32   0   2.7T  0 disk
└─sdc1   8:33   0   2.7T  0 part /srv/media
sdd      8:48   0 931.5G  0 disk
└─sdd1   8:49   0 931.5G  0 part /srv/backup
sr0     11:0    1  1024M  0 rom

You can edit the disk partitions before submitting to add further disks at specific mount points. Mount points used were.. (which in this case were manually configured as I did not want to lose existing data)

/srv/media (using ext4)
/srv/data (using ext4)
/srv/backup (using ext4)

To improve SATA SSD performance, create /etc/udev/rules.d/60-ssd-scheduler.rules:

# Set deadline scheduler for non-rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"

To preserve the life of SSDs by reducing swap file usage, add the following to /etc/sysctl.conf:

# Decrease swap usage

User Config

When prompted create the system login user / password The server will install the basics, set up your user / timezone etc. Eventually you will be prompted to Reboot.

Reboot Now

Set up software repositories and update system

We need to add additional repositories so we can download all the nice pieces of software and grab all the security updates, we do this by editing the config file listing the repositories.

sudo nano /etc/apt/sources.list

Note: sudo elevates you to ROOT status, by typing sudo –s before you begin maintains your elevated status so you don’t have to keep typing sudo; nano is a simple text editor. Note that ‘#’ and ‘;’ indicates the line has been commented out.

Comment/Uncomment and repositories you wish to use.

Now we have to get Ubuntu to update its internal repository database

sudo apt update

Now we can do a full distribution upgrade which gets us all the latest patches and fixes.

sudo apt dist-upgrade

Say yes to accept the installation. The dist upgrade may take some time to install,

You probably then want to update any of the minor packages.

sudo apt upgrade

Answer yes to any of the upgrade questions. After it is probably wise to reboot and make sure everything is still good. Especially as you have probably got your self an updated linux kernel.

sudo reboot

SSH Server

Check that SSH server is working, (it is now installed and set to run by default in 18.04) Run a PuTTY session to the server and check connectivity.

Network Interface Configuration

Configure a network bridge to present a single interface to the world, this is handy for VMs / VPNs etc. as we only need to reference the bridge. (br0:) 18.04 uses netplan to configure its network configuration.

The following steps will set up a bridge with a static IP address.

apt update
apt dist-upgrade
apt install bridge-utils

To get us up to date and install the bridge utilities.

Change to the netplan directory.

cd /etc/netplan
mv 50-cloud-init.yaml 50-cloud-init.ORIG
nano 01-bridge.yaml

Content of the 01-bridge.yaml

  version: 2
  renderer: networkd

      match: {name: "ethxxxx*"}

      interfaces: [switchports]
      dhcp4: no
      addresses: []
        addresses: []
        stp: false
        forward-delay: 0

Disable the cloud network configuration.

nano /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

Add this statement to the empty file.

network: {config: disabled}

Apply the changes

netplan --debug apply

Reboot and check the network configuration with


You should have an interface of br0: with the ip you specified.

br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::8844:aff:fe67:ef14  prefixlen 64  scopeid 0x20<link>
        ether 8a:44:0a:67:ef:14  txqueuelen 1000  (Ethernet)
        RX packets 23464422  bytes 9513732953 (9.5 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6353547  bytes 53276355156 (53.2 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 6c:3b:e5:1b:e8:fb  txqueuelen 1000  (Ethernet)
        RX packets 25170973  bytes 10035606810 (10.0 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 40336930  bytes 55285023271 (55.2 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf7c00000-f7c20000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1754201  bytes 2338671140 (2.3 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1754201  bytes 2338671140 (2.3 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Further Configurations

Continue with

  • = Optional.

Network / DNS Config

DHCP Server Installation
Bind9 (DNS) Installation
Dynamic DNS setup

Security / Monitoring.

Logwatch Installation
Fail2ban installation

LAMP Stack / Web Servers / Databases

LAMP Stack Installation 18.04
Configure MySQL
Apache Configuration
PHP Configuration
PhpMyadmin Installation

Torrents / File shares / Time

Transmission Daemon Installation *
Samba Installation *
NTP Daemon Installation

Media Gaming

Plex Media Server installation *
Teamspeak Server Installation *
Domoticz Installation *
Minecraft Server Install *
Steam Client Install *
7 Days to Die Server Install *
Arma 3 Server Install *

Open VPN

Open VPN Install *

Next Cloud / Scottcloud

Next Cloud Installation *


MediaWiki Installation *


Amanda Backup Server Installation *
Amanda File Recovery