This is an old revision of the document!
Table of Contents
Systems - Media Server - Install Ubuntu Server
It is recommended to install a Long-Term Support (LTS) release of Ubuntu.
Steps
- Download the ISO image for Ubuntu Server from the Ubuntu website.
- Write the ISO image for Ubuntu Server to a USB drive.
- Boot from USB drive.
- Select Ubuntu Server (minimized) and Search for third-party drivers.
- Set a static IP.
- Guided Storage Configuration - Select to Use the entire disk, and unselect “Set up this disk as an LVM group”.
- SSH Config - Select to Install OpenSSH Server.
- Reboot.
- Update.
- Clean up.
- Reboot again.
- Install multimedia codecs.
ALERT: To prevent accidentally installing Ubuntu on the wrong drive and overwriting data it is recommended to disconnect data drives during installation.
Set a static IP
Subnet: 192.168.1.0/24 Address: 192.168.1.85 Gateway: 192.168.1.1 Name Servers: 192.168.1.1, 192.168.1.50 Search Domains: <blank>
Update
sudo apt update && sudo apt upgrade -y
Clean up
sudo apt autoremove sudo apt clean sudo reboot
NOTE: This removes any unnecessary packages and cleans up the apt cache.
Install VIM
sudo apt install vim-nox
NOTE: vim-nox is the full version of vim.
- Of course, different text editor such as joe or nano can be installed as well.
Change the default shell
Go into root mode:
sudo -i
Check the current default values for debconf
debconf-show debconf
returns:
debconf-apt-progress/preparing: debconf/frontend: Dialog debconf-apt-progress/title: debconf-apt-progress/info: debconf/priority: high debconf-apt-progress/media-change:
NOTE: Notice the line debconf/frontend.
- This needs to be changed to Noninteractive.
Change the frontend to Noninteractive
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
and recheck the values:
debconf-show debconf
returns:
debconf-apt-progress/preparing: * debconf/frontend: Noninteractive debconf/priority: high debconf-apt-progress/media-change: debconf-apt-progress/title: debconf-apt-progress/info:
sudo dpkg-reconfigure dash
When asked Install dash as /bin/sh? specify No.
NOTE: /bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash:
- The reason that dash was set as the default is that dash provides faster boot times.
- It does not however have the full feature set offered by bash.
- On a modern server this speed difference in booting is negligible; and not too important as servers usually are not booted very often.
debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 79.) debconf: falling back to frontend: Readline
NOTE:
Update inputrc
Update /etc/inputrc to support being able to use arrow keys for history searches.
Add the following lines to the bottom of the file.
- /etc/inputrc
... # Peter added these "\e0A": history-search-backward "\e0B": history-search-forward "\e0C": forward-char "\e0D": backward-char "\e[A": history-search-backward "\e[B": history-search-forward "\e[C": forward-char "\e[D": backward-char
NOTE: This allows one to type the first letter of a previous command, and then by using the arrow up key for example, will only show previous commands also starting with that letter.
Remove snap if installed
List all installed Snap packages
snap list
Remove all the Snap packages
sudo snap remove <package_name>
Purge snapd
sudo apt purge snapd
NOTE: Clean up any remaining directories.
Install multimedia codecs
sudo apt install ubuntu-restricted-extras -y