To start the installation, download the Raspberry Pi Imager from the official Raspberry Pi website. Insert the SD card (min. 8GB) and select Ubuntu Server 20.04 LTS from the list of the available operating systems. Once the write and verify is complete, insert the SD card in the raspberry pi, connect the HDMI, network cable, and power source.
The default username and password is ubuntu. Change the password on the first login. Once the password is changed, sudo to root and change the root password as well.
# sudo -s
Once the password is changed, edit the apt conf file and disable automatic updates installation. Keep the automatic package list update.
# vim /etc/apt/apt.conf.d/20auto-upgrades
Make sure that the configuration is like this:
Save and exit.
Install the aptitude package:
# apt-get install -y aptitude
Update the package list:
# aptitude update
Install available updates with dependencies:
# aptitude safe-upgrade
Disable WLAN0 and the Bluetooth:
# vim /boot/firmware/config.txt
Add at the end of the file:
Save and exit.
# touch /etc/cloud/cloud-init.disabled
Configure the static IP address:
# vim /etc/netplan/50-cloud-init.yaml
And type in the static IP address. In this case 10.0.0.99
addresses: [10.0.254.1, 10.0.254.2, 10.0.255.1, 10.0.255.2]
Save and exit. Apply the configuration:
# sudo netplan apply
Create another user (in this example user is “keeper”) and fill in all the necessary information:
# adduser keeper
Add the new user to the sudoers:
Add at the end of the file
keeper ALL=(ALL:ALL) ALL
Save and exit. Logout and log in using a new username. Delete user ubuntu:
# sudo userdel -r -f ubuntu
Disable IPv6 on the pi:
# sudo vim /etc/sysctl.conf
add the following 3 lines at the end of the file:
Save and exit. Apply the new configuration:
# sudo sysctl -p
If the IPv6 is still active after the reboot, create the following file:
# sudo vim /etc/rc.local
and add the following:
Change the permission on the file.
# chmod 775 /etc/rc.local
This will manually read the kernel parameter from the configuration file during boot and disable IPv6.
Change the hostname:
# sudo echo rocket01.sefnet.net > /etc/hostname
# vim /etc/hosts
And add the new hostname including the IP address (in this case 10.0.99.99)
10.0.99.99 rocket01.sefnet.net rocket01
# systemctl stop apparmor
# systemctl disable apparmor
The server is ready for use. Now you can install any required package and configure the required function.