Quidest?

Fedora Server setup

ยท Lorenzo Drumond

Create a bootable stick using a spare USB stick. Plug it in, unmount it and run

1dd if=fedora_server_iso_location of=/dev/sdb status=progress

where /dev/sdb is the device file of the USB stick (not a parition!)

When finished, plug it in the device (laptop in our case) you want to turn into server, and boot that device from that USB stick.

Follow the installation steps and you should have your Fedora Instance running.

Log in as root.

Upgrade the system:

1dnf upgrade
2shutdown -r now

In order to turn off the display after one minute, edit /etc/default/grub and add or modify it so that it has

1GRUB_CMDLINE_LINUX="consoleblank=60"

and then run

1grub2-mkconfig

In order to not put the computer in suspend when closing the lid, modify /etc/systemd/logind.conf so that it contains (not commented):

1HandleLidSwitch=ignore
2HandleLidSwitchExternalPower=ignore
3HandleLidSwitchDocked=ignore

Also setup a different account from root, so that we can log-into the web-console:

1useradd -aG wheel LOGIN
2passwd LOGIN

Set up a static IP for this computer on your network, so that if the router is running DHCP, the same IP will always be assigned to this computer.

After that, we need to tell NetworkManager that we have a static IP. This will stop NetworkManager to run the DHCP client and it will free up port 68.

1nmcli con mod DEVICE ipv4.addresses "ADDRESS"
2nmcli con mod DEVICE ipv4.gateway "GATEWAY"
3nmcli con mod DEVICE ipv4.method manual
4nmcli con mod DEVICE connection.autoconnect yes

Let’s now install Docker so that we can run all our services

1dnf -y install dnf-plugins-core
2dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
3dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
4systemctl enable --now docker
5docker run hello-world

References

#installation #fedora #setup #server #homelab #os