1.5 KiB
Post install script for Ubuntu 22.04 server
Prerequisites
A clean Ubuntu 22.04 server although this should work on Ubuntu 20.04 as well.
IMPORTANT
This will configure sshd with the following.
PermitRootLogin no
PasswordAuthentication noSo be sure to have your public keys in place or you wont be able to login after the script has completed.
Download the script
git clone https://git.x-files.dk/ubuntu-server/ubuntu-postinstall.git
Usage
cd ubuntu-postinstall
sudo ./ubuntu-postinstall [-n] <hostname or fqdn> [-i] <ip>=<ipaddr or dhcp> [-g] <gateway>=<ipaddr> [-t] <timezone>=<dk est pst cst utc> [-s] <sync time via ntp>=<y or n> [-help] help
Example 1
cd ubuntu-postinstall
sudo ./postinstall -n host1.hostname -i dhcp -t est -s n
Example 2
cd ubuntu-postinstall
sudo ./postinstall -n host1.hostname -i 192.168.1.151 -g 192.168.1.1 -t dk -s y
Additional software beeing installed
apt-transport-https - colordiff - dnsutils - expect - facter - fdupes - fping - htop - iftop - iotop - mailutils - mcrypt - net-tools - nfs-common - nmap - ntpdate - plocate - postfix - saidar - software-properties-common - sshpass - traceroute
NOTE
In order to get rid of popups for kernel updates and reloading of services when doing apt update etc. the needrestart.conf has been modified.
Postinstall
Nothing to do.
More guides
More guides can be found on [wiki.x-files.dk]
Last tested
January 12th 2024 on Ubuntu 22.04.