Setting up Res-Srv-Lin-01
Initial setup
First, update the package sources and upgrade the installed packages to the latest version:
sudo apt update && sudo apt upgrade -yyInstall packages needed later in the setup.
sudo apt install build-essential git wget taskselWe are currently using the Gnome desktop. For a minimal installation run
sudo tasksel install ubuntu-desktop-minimalAt this moment, it is good to reboot to allow our changes to take effect.
We want to use the MAC address for DHCP identification. To do that, add the
following to every NIC in /etc/netplan/<...>.yaml
dhcp-identifier: mac
optional: trueTo prevent automatic updates open Software & Updates > Updates and set
Subscribed to: All updates
Automatically check for updates: Never
When there are security updates: Display immediately
When there are other updates: Display weekly
Notify me of a new Ubuntu version: For long-term support versions
Home setup
Many of the key programs will be installed using the snap packaging format.
The snap daemon requires the user’s $HOME to be located under /home on the
local filesystem (see more
here). To do that we need to
bind-mount the alternative home location to /home (in this setup users’ home
directories are located in the external storage mounted on /data). Create the
mount point
sudo mkdir /dataMount the external storage on /data and bind-mount the actual /data/home
directory on /home. To make sure these changes are permanent add the following
to /etc/fstab:
UUID=<replace-with-disk-uuid> /data ext4 defaults 0 1
/data/home /home none bind
It would be good at this point to reboot the system.
Add users
Add any new users with
sudo useradd -m <replace-with-username> -s /bin/bashThis creates a new user, whose $HOME is located on the external storage and their
default shell is bash.
ATTENTION: This needs be done AFTER bind-mounting the home directory!
Python
To setup Python install the following packages
sudo apt update
sudo apt install ipython3 python3-pip \
python3-dev python3-tk python3-venvR and RStudio
To install R just follow the
instructions.
To install RStudio, first download the deb package from their
website. Navigate
to the download location and run
# Need to navigate to download location!
sudo apt install ./rstudio-<replace-with-version>.debThe downloaded .deb file can now be removed.
Point the CRAN mirror to the local IPCI CRAN mirror by changing the repo name
in /etc/R/Rprofile.site to http://Shr/SRV-CRAN/CRAN:
For cryptography install libsodium-dev package:
sudo apt upate && sudo apt install libsodium-dev