distros:fedora_server
This is an old revision of the document!
Table of Contents
Information
- Fedora Server 1)
- 39
Installation Notes
- Do not create a separate
swap
partition 2)
Download
PackageKit
PackageKit was caught using hundreds of MB of RAM while not actively using it 3)
- Apparently it only provides the package name for commands not found
TODO: Figure out how to prevent it from being reinstalled
sudo dnf remove PackageKit*
HOSTS
- Unified hosts + fakenews + gambling + porn + social
Initial
- Only run once
ls '/etc/hosts~' || wget -O '/tmp/hosts-tmp' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts' && sudo cp --backup '/tmp/hosts-tmp' '/etc/hosts' && sudo restorecon -F -I -R '/etc/hosts' && sync
Update
ls '/etc/hosts~' && wget -O '/tmp/hosts-tmp' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts' && sudo mv --force '/tmp/hosts-tmp' '/etc/hosts' && sudo restorecon -F -I -R '/etc/hosts' && sync
Restore Backup
ls '/etc/hosts~' && sudo restorecon -F -I -R '/etc/hosts~' && sudo mv --force '/etc/hosts~' '/etc/hosts' && sync
DNF
- Disables Delta RPMs with
deltarpm=false
echo 'deltarpm=false' | sudo tee --append '/etc/dnf/dnf.conf' > '/dev/null' && cat '/etc/dnf/dnf.conf' | grep 'deltarpm=false'
sudo -e '/etc/dnf/dnf.conf'
Software
Update
sudo dnf autoremove -y && sudo dnf distro-sync -y && sync
Firmware
sudo fwupdmgr refresh --force && sudo fwupdmgr update --verbose
GNU nano
- Installs
nano
- Sets
VISUAL
andEDITOR
tonano
via environment variable - Sets
nowrap
for current user
sudo dnf install 'nano' -y && export 'VISUAL=nano' && export 'EDITOR=nano' && echo -e 'export VISUAL=nano\nexport EDITOR=nano' | sudo tee '/etc/profile.d/editor-nano.sh' > '/dev/null' && cat '/etc/profile.d/editor-nano.sh' && mkdir -p ~/'.config/nano' && echo 'set nowrap' | tee ~/'.config/nano/nanorc' > '/dev/null' && cat ~/'.config/nano/nanorc'
General
- TODO: Figure out
policycoreutils-devel
sudo dnf install aria2 binutils hdparm htop kernel-tools lm_sensors openssl1.1 p7zip p7zip-plugins unar wget
policycoreutils-devel
Settings
Laptop Server
- This tells
systemd
to ignore Lid close events and prevents system suspend 4)
sudo mkdir -p '/etc/systemd/logind.conf.d' && echo -e "[Login]\nHandleLidSwitch=ignore" | sudo tee '/etc/systemd/logind.conf.d/99-laptop-server.conf' > '/dev/null'
sudo -e '/etc/systemd/logind.conf.d/99-laptop-server.conf'
Network
Anaconda
systemd-resolved
- systemd-resolved caches DNS
- Quad9, see dns_servers for other servers
sudo mkdir -p '/etc/systemd/resolved.conf.d' && sudo -e '/etc/systemd/resolved.conf.d/99-dns-over-tls.conf'
[Resolve] DNS=9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net DNSOverTLS=yes
NetworkManager
- Change
ens3
as-needed
nmcli connection show
sudo nmcli connection modify 'ens3' 'ipv4.dns' '127.0.0.1,9.9.9.9,149.112.112.112'
sudo nmcli connection modify 'ens3' 'ipv6.dns' '::1,2620:fe::fe,2620:fe::9'
Hostname
- Change
x
to computer name - Likely not needed if set through Anaconda
hostnamectl set-hostname 'x'
lm_sensors
sudo sensors-detect --auto
sudo -e '/etc/sysconfig/lm_sensors'
Secure Shell
- See Client notes to generate/restore public key
Drive Maintenance
Trim
sudo systemctl enable 'fstrim.timer' --now && sudo systemctl start 'fstrim' && sync && sudo systemctl status 'fstrim' -l
UTC
- Set RTC to UTC
sudo timedatectl set-local-rtc '0'
Verify
timedatectl | grep local
Automatic Updates
Service
sudo -e '/etc/systemd/system/fedora-up.service'
[Service] Type=oneshot ExecStartPre='/usr/bin/dnf' clean 'all' ExecStart='/usr/bin/dnf' distro-sync -y ExecStart='/usr/bin/dnf' autoremove -y ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/systemctl' reboot
Timer
00:00
Oak
sudo -e '/etc/systemd/system/fedora-up.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'fedora-up.timer' --now
[Unit] Description=Software Package Maintenance and Updater After=network-online.target Wants=network-online.target [Timer] OnCalendar=*-*-* 00:00:00 Persistent=true [Install] WantedBy=timers.target
Notable Folders and Commands
- See misc_linux
Firewalld
- See Firewalld notes
/srv/www/wiki/data/attic/distros/fedora_server.1707165632.txt.gz · Last modified: (external edit)