Apply for Free VPS

Getting started with AlmaLinux and Rocky Linux

Updated 27 Nov 2026 almalinux rocky selinux

Package management, extra repositories, the firewall and SELinux.

Packages

sudo dnf upgrade -y
sudo dnf search nginx
sudo dnf install -y nginx
sudo dnf history

Extra packages

sudo dnf install -y epel-release

Firewall

See firewalld.

SELinux

SELinux limits what each service may do, and is enforcing by default.

getenforce
sudo ausearch -m avc -ts recent

Fix the cause instead of turning it off. Common cases:

# Let a web server connect to a network service such as an application
sudo setsebool -P httpd_can_network_connect 1

# Label web content in a custom folder
sudo dnf install -y policycoreutils-python-utils
sudo semanage fcontext -a -t httpd_sys_content_t "/srv/site(/.*)?"
sudo restorecon -Rv /srv/site

Services

Unit names sometimes differ from Ubuntu: SSH is sshd and Apache is httpd.

Was this helpful?

Report outdated or incorrect information