User Tools

Site Tools


distros:ubuntu_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
distros:ubuntu_server [2020/06/11 17:20] Sean Rhonedistros:ubuntu_server [2024/08/13 16:58] (current) – removed Sean Rhone
Line 1: Line 1:
-====== Information ====== 
  
-  * Ubuntu Server ((http://www.ubuntu.com/server)) 
-  * 18.04.3 LTS 
- 
-====== Known Issues ====== 
- 
-  * None 
- 
-====== Download ====== 
- 
-  * http://www.ubuntu.com/download/server 
-  * http://cdimage.ubuntu.com/releases/ 
- 
-====== Installation Notes ====== 
- 
-  * :!: Either use the Alternate or Network installer images to avoid cloud-init stuff 
-  * During installation, allow network autoconfig to occur, and then go back once prompted for a hostname; this will allow setting a static IPv4 address and custom DNS settings 
- 
-====== Repositories ====== 
- 
-===== Additional Ubuntu ===== 
- 
-  * https://help.ubuntu.com/community/Repositories/Ubuntu 
-  * Only ''universe'' is likely necessary 
-  * TODO: May not even need universe on servers 
- 
-  sudo add-apt-repository 'universe' 
- 
-  sudo add-apt-repository 'multiverse' 
- 
-  sudo add-apt-repository 'restricted' 
- 
-====== 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://keybase.io 
-  * TODO: Figure out backup script 
- 
-  wget -O '/tmp/keybase_amd64.deb' 'https://prerelease.keybase.io/keybase_amd64.deb' && sudo dpkg --install '/tmp/keybase_amd64.deb' && sudo apt install -f && rm '/tmp/keybase_amd64.deb' && sync && run_keybase 
- 
-====== Settings ====== 
- 
-===== Secure Shell ===== 
- 
-  * See [[Clients:Secure Shell]] 
- 
-===== Sensors ===== 
- 
-==== Detect ==== 
- 
-**** 
- 
-  sudo sensors-detect --auto 
- 
-==== Watch ==== 
- 
-**** 
- 
-  sudo watch -n0.1 sensors 
- 
-===== Uncomplicated Firewall ===== 
- 
-  * Allows SSH 
-  * Limits SSH connections 
-  * See [[notes:ufw|ufw]] for more notes 
- 
-  sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw allow 'ssh' && sudo ufw limit 'ssh' && sudo ufw enable && sudo systemctl enable 'ufw' 
- 
-====== Automatic Updates ====== 
- 
-===== Config ===== 
- 
-  * Should keep old config files in-case updated package changes their config (needs tested) 
- 
-  sudo -e '/etc/apt/apt.conf.d/99auto-update-custom' 
- 
-<code> 
-Dpkg::Options { 
-   "--force-confdef"; 
-   "--force-confold"; 
-}</code> 
- 
-===== Service ===== 
- 
-  sudo -e '/etc/systemd/system/ubuntu-up.service' 
- 
-<code> 
-[Service] 
-Type=oneshot 
-ExecStartPre='/usr/bin/apt' clean 
-ExecStart='/usr/bin/apt' update 
-ExecStart='/usr/bin/apt' full-upgrade -y 
-ExecStart='/usr/bin/apt' autoremove -y 
-ExecStartPost='/bin/sync' 
-ExecStartPost='/bin/systemctl' reboot</code> 
- 
-===== Timer ===== 
- 
-  * 06:10 Kraityn 
-  * 06:20 Alira 
-  * 06:30 Oak 
-  * 06:40 Hatebeat 
- 
-  sudo -e '/etc/systemd/system/ubuntu-up.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'ubuntu-up.timer' --now 
- 
-<code> 
-[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</code> 
- 
-====== External Backup ====== 
- 
-===== fstab ===== 
- 
-  * Expects a drive of some kind with a XFS partition at ''/dev/sdb1'' 
- 
-  sudo mkdir -p '/mnt/USB' && sudo -e '/etc/fstab' 
- 
-<code> 
-# USB 
-/dev/sdb1 /mnt/USB xfs rw,relatime,attr2,inode64,noquota 0 2</code> 
- 
-  sudo mount '/dev/sdb1' 
- 
-===== Service ===== 
- 
-  * TODO: Ubuntu paths 
- 
-  sudo -e '/etc/systemd/system/backup-external.service' && sudo sed -i 's/CHANGEME/'$USER'/g' '/etc/systemd/system/backup-external.service' 
- 
-<code> 
-[Service] 
-Type=oneshot 
-ExecStartPre='/usr/bin/sync' 
-ExecStart='/usr/bin/rsync' -r '/home/CHANGEME/backups' '/mnt/USB' --verbose --ignore-existing 
-ExecStartPost='/usr/bin/sync'</code> 
- 
-===== Timer ===== 
- 
-  sudo -e '/etc/systemd/system/backup-external.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'backup-external.timer' --now 
- 
-<code> 
-[Unit] 
-Description=Backup Backups to External Device 
- 
-[Timer] 
-OnCalendar=*-*-* 07:00:00 
-Persistent=true 
- 
-[Install] 
-WantedBy=timers.target</code> 
- 
-====== Notable Folders and Commands ====== 
- 
-===== fstrim ===== 
- 
-**** 
- 
-  sudo fstrim -v --all 
- 
-===== Show CPU Frequency ===== 
- 
-  grep 'MHz' '/proc/cpuinfo' 
- 
-  watch -n 0.1 grep \'cpu MHz\' '/proc/cpuinfo' 
- 
-===== Partition Information ===== 
- 
-**** 
- 
-  df -hT 
- 
-===== Hyper-threading Information ===== 
- 
-**** 
- 
-  grep -e "processor" -e "core id" -e "^$" /proc/cpuinfo 
- 
-===== Optimal GCC compiler flags ===== 
- 
-**** 
- 
-  gcc -v -E -x c -march=native -mtune=native - < /dev/null 2>&1 | grep cc1 | perl -pe 's/ -mno-\S+//g; s/^.* - //g;' 
- 
-====== Privacy ====== 
- 
-===== Clear Terminal History ===== 
- 
-**** 
- 
-  history -cw 
- 
-===== Create 7z Password Archive ===== 
- 
-  * Change ''x'' in ''x.7z'' to the desired archive name 
-  * Change ''CHANGEME'' in ''-pCHANGEME'' to the desired password 
- 
-  7za a 'x.7z' -p'CHANGEME' 
/srv/www/wiki/data/attic/distros/ubuntu_server.1591910451.txt.gz · Last modified: (external edit)