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/11 17:20] – Sean Rhone | distros:ubuntu_server [2024/02/07 09:22] (current) – Sean Rhone | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Information ====== | ====== Information ====== | ||
- | * Ubuntu Server ((http:// | + | * Ubuntu |
- | * 18.04.3 LTS | + | * Server ((http:// |
+ | * 23.10 | ||
- | ====== | + | ====== |
- | * None | + | * 23.10' |
+ | * :!: 2024/02/07: The 23.10 installer seems to progress very slowly or hang with 1 GB physical RAM at the very end both when waiting for it to do security updates and with pressing cancel updates and reboot; hard-rebooting a VPS at this point seems fine | ||
====== Download ====== | ====== Download ====== | ||
+ | |||
+ | ===== Etcher Image Writer ===== | ||
+ | |||
+ | * https:// | ||
+ | |||
+ | ===== Ubuntu ===== | ||
* http:// | * http:// | ||
* http:// | * http:// | ||
- | ====== | + | ====== |
- | * :!: Either use the Alternate or Network installer images to avoid cloud-init stuff | + | * https:// |
- | * During installation, | + | * Unified hosts + fakenews + gambling |
+ | |||
+ | ===== Initial ===== | ||
+ | |||
+ | * Only run once | ||
+ | |||
+ | ls '/ | ||
+ | |||
+ | ===== Update ===== | ||
+ | |||
+ | **** | ||
+ | |||
+ | | ||
+ | |||
+ | ===== Restore Backup ===== | ||
+ | |||
+ | **** | ||
+ | |||
+ | ls '/ | ||
====== Repositories ====== | ====== Repositories ====== | ||
+ | |||
+ | ===== Disable cdrom Repo ===== | ||
+ | |||
+ | * Add a ''#'' | ||
+ | * Solves '' | ||
+ | |||
+ | sudo -e '/ | ||
+ | |||
+ | < | ||
===== Additional Ubuntu ===== | ===== Additional Ubuntu ===== | ||
* https:// | * https:// | ||
- | * Only '' | + | * Only '' |
- | * TODO: May not even need universe on servers | + | * 2023/05/04: There doesn' |
sudo add-apt-repository ' | sudo add-apt-repository ' | ||
Line 31: | Line 66: | ||
sudo add-apt-repository ' | sudo add-apt-repository ' | ||
+ | |||
+ | ===== Keybase ===== | ||
+ | |||
+ | * https:// | ||
+ | * https:// | ||
+ | * :!: This is only the signing key, see [[# | ||
+ | |||
+ | wget -O '/ | ||
====== Software ====== | ====== Software ====== | ||
Line 42: | Line 85: | ||
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean && sync | sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean && sync | ||
- | ==== Snaps ==== | + | ==== Firmware |
**** | **** | ||
- | sudo snap refresh | + | sudo fwupdmgr |
- | ===== General ===== | + | ==== Snaps ==== |
**** | **** | ||
- | sudo apt install lm-sensors | + | sudo snap refresh |
===== Keybase ===== | ===== Keybase ===== | ||
Line 59: | Line 102: | ||
* TODO: Figure out backup script | * TODO: Figure out backup script | ||
- | wget -O '/ | + | |
====== Settings ====== | ====== Settings ====== | ||
- | ===== Secure Shell ===== | + | ===== GRUB ===== |
- | | + | ==== Config ==== |
+ | |||
+ | * :!: [[notes: | ||
+ | * Add options in '' | ||
+ | |||
+ | sudo -e '/ | ||
+ | |||
+ | ===== Drive Maintenance ===== | ||
+ | |||
+ | ==== Trim ==== | ||
+ | |||
+ | **** | ||
+ | |||
+ | sudo systemctl enable ' | ||
+ | |||
+ | ==== XFS Scrub ==== | ||
+ | |||
+ | * [[https:// | ||
+ | * :!: This is only necessary if XFS is being used on any persistent drives such as a NAS, and requires '' | ||
+ | |||
+ | sudo apt install ' | ||
+ | |||
+ | sudo systemctl enable ' | ||
+ | |||
+ | ===== UTC ===== | ||
+ | |||
+ | * [[https:// | ||
+ | * Set RTC to UTC | ||
+ | * :!: Needed if Windows is installed first | ||
+ | * :!: Windows should also be set to UTC | ||
+ | |||
+ | sudo timedatectl set-local-rtc ' | ||
+ | |||
+ | ==== Verify ==== | ||
+ | |||
+ | **** | ||
+ | |||
+ | timedatectl | grep local | ||
+ | |||
+ | ===== OpenSSH ===== | ||
+ | |||
+ | * See [[clients: | ||
+ | | ||
===== Sensors ===== | ===== Sensors ===== | ||
+ | |||
+ | ==== Install ==== | ||
+ | |||
+ | **** | ||
+ | |||
+ | sudo apt install lm-sensors | ||
==== Detect ==== | ==== Detect ==== | ||
Line 79: | Line 170: | ||
**** | **** | ||
- | sudo watch -n0.1 sensors | + | sudo watch --interval '0.5' |
===== Uncomplicated Firewall ===== | ===== Uncomplicated Firewall ===== | ||
* Allows SSH | * Allows SSH | ||
- | * Limits | + | * :!: Does not limit SSH ((this caused issues; better to just secure SSH)) |
* See [[notes: | * See [[notes: | ||
- | sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw allow ' | + | sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw allow ' |
====== Automatic Updates ====== | ====== Automatic Updates ====== | ||
Line 94: | Line 185: | ||
* Should keep old config files in-case updated package changes their config (needs tested) | * Should keep old config files in-case updated package changes their config (needs tested) | ||
+ | * :!: 2023/05/04: Not sure if this is needed still? | ||
sudo -e '/ | sudo -e '/ | ||
Line 114: | Line 206: | ||
ExecStart='/ | ExecStart='/ | ||
ExecStart='/ | ExecStart='/ | ||
- | ExecStartPost='/ | + | ExecStart='/ |
- | ExecStartPost='/ | + | ExecStartPost=' |
+ | ExecStartPost=' | ||
===== Timer ===== | ===== Timer ===== | ||
- | * 06:10 Kraityn | + | * '' |
- | * 06:20 Alira | + | |
- | * 06:30 Oak | + | |
- | * 06:40 Hatebeat | + | |
sudo -e '/ | sudo -e '/ | ||
Line 133: | Line 223: | ||
[Timer] | [Timer] | ||
- | OnCalendar=*-*-* | + | OnCalendar=*-*-* |
Persistent=true | Persistent=true | ||
Line 140: | Line 230: | ||
====== External Backup ====== | ====== External Backup ====== | ||
+ | |||
+ | * :!: 2023/05/04: This hasn't been used for years and likely needs re-factored | ||
===== fstab ===== | ===== fstab ===== | ||
Line 154: | Line 246: | ||
===== Service ===== | ===== Service ===== | ||
- | |||
- | * TODO: Ubuntu paths | ||
sudo -e '/ | sudo -e '/ | ||
Line 183: | Line 273: | ||
====== Notable Folders and Commands ====== | ====== 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