distros:ubuntu_server
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
distros:ubuntu_server [2020/06/12 02:48] – [Force Public Key Authentication] Sean Rhone | distros:ubuntu_server [2024/08/13 16:58] (current) – removed Sean Rhone | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Information ====== | ||
- | * Ubuntu Server ((http:// | ||
- | * 18.04.3 LTS | ||
- | |||
- | ====== Known Issues ====== | ||
- | |||
- | * None | ||
- | |||
- | ====== Download ====== | ||
- | |||
- | * http:// | ||
- | * http:// | ||
- | |||
- | ====== Installation Notes ====== | ||
- | |||
- | * :!: Either use the Alternate or Network installer images to avoid cloud-init stuff | ||
- | * During installation, | ||
- | |||
- | ====== Repositories ====== | ||
- | |||
- | ===== Additional Ubuntu ===== | ||
- | |||
- | * https:// | ||
- | * Only '' | ||
- | * TODO: May not even need universe on servers | ||
- | |||
- | sudo add-apt-repository ' | ||
- | |||
- | sudo add-apt-repository ' | ||
- | |||
- | sudo add-apt-repository ' | ||
- | |||
- | ====== Software ====== | ||
- | |||
- | ===== Update ===== | ||
- | |||
- | ==== System ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean && sync | ||
- | |||
- | ==== Snaps ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo snap refresh | ||
- | |||
- | ===== General ===== | ||
- | |||
- | **** | ||
- | |||
- | sudo apt install lm-sensors | ||
- | |||
- | ===== Keybase ===== | ||
- | |||
- | * https:// | ||
- | * TODO: Figure out backup script | ||
- | |||
- | wget -O '/ | ||
- | |||
- | ====== Settings ====== | ||
- | |||
- | ===== Secure Shell ===== | ||
- | |||
- | * See [[Clients: | ||
- | |||
- | ==== Force Public Key Authentication ==== | ||
- | |||
- | * :!: Be sure to generate/ | ||
- | * :!: See [[clients: | ||
- | * :!: Check ''/ | ||
- | |||
- | echo ' | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | ===== Sensors ===== | ||
- | |||
- | ==== Detect ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo sensors-detect --auto | ||
- | |||
- | ==== Watch ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo watch -n0.1 sensors | ||
- | |||
- | ===== Uncomplicated Firewall ===== | ||
- | |||
- | * Allows SSH | ||
- | * Limits SSH connections | ||
- | * See [[notes: | ||
- | |||
- | sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw allow ' | ||
- | |||
- | ====== Automatic Updates ====== | ||
- | |||
- | ===== Config ===== | ||
- | |||
- | * Should keep old config files in-case updated package changes their config (needs tested) | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | Dpkg:: | ||
- | " | ||
- | " | ||
- | }</ | ||
- | |||
- | ===== Service ===== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Service] | ||
- | Type=oneshot | ||
- | ExecStartPre='/ | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | ExecStartPost='/ | ||
- | ExecStartPost='/ | ||
- | |||
- | ===== Timer ===== | ||
- | |||
- | * 06:10 Kraityn | ||
- | * 06:20 Alira | ||
- | * 06:30 Oak | ||
- | * 06:40 Hatebeat | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Unit] | ||
- | Description=Software Package Maintenance and Updater | ||
- | After=network-online.target | ||
- | Wants=network-online.target | ||
- | |||
- | [Timer] | ||
- | OnCalendar=*-*-* 06:10:00 | ||
- | Persistent=true | ||
- | |||
- | [Install] | ||
- | WantedBy=timers.target</ | ||
- | |||
- | ====== External Backup ====== | ||
- | |||
- | ===== fstab ===== | ||
- | |||
- | * Expects a drive of some kind with a XFS partition at ''/ | ||
- | |||
- | sudo mkdir -p '/ | ||
- | |||
- | < | ||
- | # USB | ||
- | /dev/sdb1 /mnt/USB xfs rw, | ||
- | |||
- | sudo mount '/ | ||
- | |||
- | ===== Service ===== | ||
- | |||
- | * TODO: Ubuntu paths | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Service] | ||
- | Type=oneshot | ||
- | ExecStartPre='/ | ||
- | ExecStart='/ | ||
- | ExecStartPost='/ | ||
- | |||
- | ===== Timer ===== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | < | ||
- | [Unit] | ||
- | Description=Backup Backups to External Device | ||
- | |||
- | [Timer] | ||
- | OnCalendar=*-*-* 07:00:00 | ||
- | Persistent=true | ||
- | |||
- | [Install] | ||
- | WantedBy=timers.target</ | ||
- | |||
- | ====== Notable Folders and Commands ====== | ||
- | |||
- | ===== fstrim ===== | ||
- | |||
- | **** | ||
- | |||
- | sudo fstrim -v --all | ||
- | |||
- | ===== Show CPU Frequency ===== | ||
- | |||
- | grep ' | ||
- | |||
- | watch -n 0.1 grep \'cpu MHz\' '/ | ||
- | |||
- | ===== Partition Information ===== | ||
- | |||
- | **** | ||
- | |||
- | df -hT | ||
- | |||
- | ===== Hyper-threading Information ===== | ||
- | |||
- | **** | ||
- | |||
- | grep -e " | ||
- | |||
- | ===== Optimal GCC compiler flags ===== | ||
- | |||
- | **** | ||
- | |||
- | gcc -v -E -x c -march=native -mtune=native - < /dev/null 2>&1 | grep cc1 | perl -pe 's/ -mno-\S+// | ||
- | |||
- | ====== Privacy ====== | ||
- | |||
- | ===== Clear Terminal History ===== | ||
- | |||
- | **** | ||
- | |||
- | history -cw | ||
- | |||
- | ===== Create 7z Password Archive ===== | ||
- | |||
- | * Change '' | ||
- | * Change '' | ||
- | |||
- | 7za a ' |
/srv/www/wiki/data/attic/distros/ubuntu_server.1591944520.txt.gz · Last modified: by Sean Rhone