AlmaLinux and Rocky Linux are free Linux systems built from the sources of Red Hat Enterprise Linux (RHEL). They took the place of CentOS Linux, which no longer gets updates, so CentOS is not in the list of systems for your server. Most of our Linux guides are written for Ubuntu. This page shows what is different on AlmaLinux and Rocky Linux and where the separate guides are. We tested on a dedicated server installed from the Client Area with AlmaLinux 9, and in test machines with AlmaLinux 10 and Rocky Linux 9.

You need the server's IP address from the page of your service and the root password from its Credentials tab in the Client Area, unless you entered your own password or SSH key during the installation.


Version 9 or 10?

Both systems can be installed in version 9 or 10 (Reinstalling your Dedicated Server). Version 9 gets updates until 2032, version 10 until 2035.

⚠ Version 10 needs a newer processor

AlmaLinux 10 and Rocky Linux 10 need a processor with the instruction set x86-64-v3. Intel Xeon processors have it since the Haswell generation (2013), AMD processors since about 2015. For example, on a server with an Intel Xeon E3-1230 from 2011, neither of them starts. Before you reinstall, check it in the Linux that runs on your server now:

/lib64/ld-linux-x86-64.so.2 --help | grep x86-64-v3

If the answer is x86-64-v3 (supported, searched), version 10 runs on your server. If it shows only x86-64-v3, choose version 9.

SELinux

SELinux is an extra protection layer of these systems: every service may only use the files and ports meant for it. After an installation of AlmaLinux 9 from the Client Area, it is switched off (getenforce answers Disabled). Our guides still show the SELinux commands where they are needed: with SELinux off they change nothing and give no error, and with SELinux on they are needed. How to switch it on and what to do when it blocks something: SELinux on AlmaLinux and Rocky Linux.

The First Day

  1. Connect. How to Connect to a Linux Server via SSH.
  2. Install updates with dnf upgrade. Unlike Ubuntu, the system does not install updates by itself until you switch it on: Automatic Updates on AlmaLinux and Rocky Linux.
  3. Log in with a key. Switch password login off: Log In to Your Linux Server With an SSH Key; the last command there is systemctl reload sshd.
  4. Switch on the firewall. It is installed but switched off after the installation: Protect Your AlmaLinux or Rocky Linux Server With firewalld and Fail2ban.

A User With sudo Rights

Work as your own user and use sudo for administrator commands. On AlmaLinux and Rocky Linux, the members of the group wheel may use sudo (on Ubuntu the group is called sudo). Replace alex with your name:

useradd alex
passwd alex
usermod -aG wheel alex

useradd also creates the home folder /home/alex; passwd asks for the new password twice. To check it, run sudo whoami as alex: it asks for the user's password and answers root.

Manage the Server in the Browser: Cockpit

dnf install cockpit
systemctl enable --now cockpit.socket

The second line is needed: Cockpit does not start by itself after the installation. Open https://YOUR.SERVER.IP:9090 and log in with your user from above; Cockpit does not accept root. When firewalld is on, it lets port 9090 in from everywhere by default, so the page answers from other computers at once. To close the port or allow only your address, see the firewall guide. What you find where in Cockpit: Manage Your Linux Server in the Browser With Cockpit. Skip its step 2 about NetworkManager: on AlmaLinux and Rocky Linux, NetworkManager manages the network, and Cockpit sees it as online.

Guides for AlmaLinux and Rocky Linux

Our Ubuntu Guides on AlmaLinux and Rocky Linux

Our other Linux guides were written for Ubuntu. Most of them use commands that work the same on any Linux system, for example those about disk space, files, archives, permissions, SSH keys and backups. These are the differences we know about:

In the Ubuntu guideOn AlmaLinux and Rocky Linux
apt install …dnf install …. Some programs come from EPEL, for example ncdu, htop, restic, rclone, fail2ban and vnstat: dnf and EPEL. Some packages have other names: mtr (not mtr-tiny), lm_sensors, wireguard-tools, google-authenticator, php-mysqlnd.
systemctl reload ssh, journalctl -u sshThe SSH service is called sshd: systemctl reload sshd, journalctl -u sshd.
journalctl -u cronThe cron service is called crond.
adduser, group sudouseradd and passwd, group wheel (see above).
Firewall with ufwfirewalld: firewall guide.
A service that starts your own scriptWorks the same, but keep the script in /usr/local/bin, not in a home folder: SELinux guide, step 5.
Logs with journalctlWork the same. The journal keeps only the messages since the last start of the server; older messages are in /var/log/messages, logins in /var/log/secure.
Time with chronyAlso chrony, but the settings are in /etc/chrony.conf and the service is called chronyd. After the installation it already uses the time server of the data center.
Load history with sardnf install sysstat is enough: it records every 10 minutes from the installation on. The history is in /var/log/sa and is kept for 28 days.
Nginx, MariaDB, Docker, SSH port, additional IP, RAIDSeparate guides, see the list above.
X2Go desktop, WordPress, WireGuard, Jellyfin, FFmpegNot described for AlmaLinux and Rocky Linux; the Ubuntu steps do not work as written. FFmpeg is neither in the official package sources nor in EPEL.

If Something Goes Wrong

  • SSH does not connect: use IPMI or noVNC and check the firewall.
  • A program reports "Permission denied" although the rights are right: SELinux on AlmaLinux and Rocky Linux.
  • You forgot the root password: How to Recover the Root Password on Linux works with the rescue system as for Ubuntu, as long as SELinux is off, as after our installation. If you switched SELinux on, Red Hat's instructions add one more step before the restart: touch /mnt/.autorelabel, so that the system relabels its files at the next start.
  • Before a reinstall: installing or reinstalling from the Client Area erases all data on all disks. Keep a backup outside the server first: Back Up Your Linux Server Before a Reinstall.

Related Guides

View all AlmaLinux and Rocky Linux guides

Was this answer helpful? 0 Users Found This Useful (0 Votes)