1.6 KiB
1.6 KiB
General
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
Docker
Official instructions: https://docs.docker.com/engine/install/rhel/
Install docker:
dnf -y install dnf-plugins-core
dnf config-manager --add-repo https://download.docker.com/linux/rhel/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:
- http://192.168.1.11:8080
- or http://192.168.1.10:8080 for the other server.
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 default, so you don't need to change this
PasswordAuthentication no
KbdInteractiveAuthentication no
Reload:
sudo systemctl reload sshd
(If you're running Fedora or RHEL) Disable web console
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