stuff/os/AlmaLinux/AlmaLinux.md
Moni Ghaoui 47aa1a3484 FC
2025-04-14 19:51:40 +02:00

1.5 KiB

General

Remove the web console and all the other stuff around it:

dnf -y remove cockpit*
firewall-cmd --permanent --remove-service=cockpit
firewall-cmd --reload
firewall-cmd --list-all

Update

dnf update

Set hostname

hostnamectl set-hostname moni-alma

Set up EPEL, follow the instructions:

And then install my favorites:

dnf install -y tmux htop ncdu neovim git

Install docker:

dnf -y install dnf-plugins-core
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
systemctl enable --now docker

Add the moni to the docker group:

usermod -aG docker moni

You need to log out and log back in and then test it:

# run without sudo
docker run -it --rm -p 8080:80 httpd:2.4

It will run in the foreground because we didn't pass -d.

Open your browser to:

You can stop the container with CTRL+C. It should clean itself up (--rm).

Cleanup:

docker image prune --all --force

SSH

nvim /etc/ssh/sshd_config

Uncomment/change these settings:

PermitRootLogin no
# PubkeyAuthentication yes <-- This is the detault, so you don't need to change this
PasswordAuthentication no
KbdInteractiveAuthentication no

Reload:

sudo systemctl reload sshd