distros:ubuntu_server
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
distros:ubuntu_server [2019/02/08 20:58] – Sean Rhone | distros:ubuntu_server [2020/06/12 03:03] – Sean Rhone | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Information ====== | ||
+ | * Ubuntu Server ((http:// | ||
+ | * 20.04 LTS | ||
+ | |||
+ | ====== Known Issues ====== | ||
+ | |||
+ | * None | ||
+ | |||
+ | ====== Download ====== | ||
+ | |||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | ====== Installation Notes ====== | ||
+ | |||
+ | * 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 ===== | ||
+ | |||
+ | ==== Bare-metal ==== | ||
+ | |||
+ | **** | ||
+ | |||
+ | sudo apt install lm-sensors | ||
+ | |||
+ | ===== Keybase ===== | ||
+ | |||
+ | * https:// | ||
+ | * TODO: Figure out backup script | ||
+ | |||
+ | wget -O '/ | ||
+ | |||
+ | ====== Settings ====== | ||
+ | |||
+ | ===== OpenSSH ===== | ||
+ | |||
+ | * See [[clients: | ||
+ | * See [[servers: | ||
+ | |||
+ | ===== Sensors ===== | ||
+ | |||
+ | ==== Detect ==== | ||
+ | |||
+ | **** | ||
+ | |||
+ | sudo sensors-detect --auto | ||
+ | |||
+ | ==== Watch ==== | ||
+ | |||
+ | **** | ||
+ | |||
+ | sudo watch -n0.1 sensors | ||
+ | |||
+ | ===== Uncomplicated Firewall ===== | ||
+ | |||
+ | * Allows SSH | ||
+ | * :!: Does not limit SSH ((this caused issues; better to just secure SSH)) | ||
+ | * 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 ' |
/var/www/wiki/data/pages/distros/ubuntu_server.txt · Last modified: 2024/02/07 09:22 by Sean Rhone