This is an original planning guide. It is not a vendor manual, an official standard, or legal advice. Example addresses use documentation ranges. Review every command before you paste it.
Where AlmaLinux sits
AlmaLinux is a RHEL rebuild, in the same command family as Rocky and RHEL: dnf, NetworkManager, firewalld, SELinux, systemd. It is a different project with different mirrors. Inventory it as AlmaLinux. Do not call it Rocky with another logo, and do not point it at Rocky's mirrors.
The first hour is still hostname, a named admin with a key, a lab address 192.0.2.10/24 via 192.0.2.1, and a firewall that allows SSH from that lab prefix and not from the world. Replace the address before production.
SELinux stays enforcing. A denial is a file context or a bug to read, not a mode change you leave in place. The RHEL pillar explains that habit. This page exists so the update source stays Alma's.
Major-version upgrades and migrations are the migration guide plus a tested image. They are not a dnf command you found in a forum and ran on the only host.
The first hour on a lab host
Step 1 on AlmaLinux covers identity. Confirm os-release says AlmaLinux and record the major version. Sibling rebuilds are easy to confuse in a screenshot. The check is: The ticket says AlmaLinux. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for AlmaLinux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.
Step 2 on AlmaLinux covers admin. Named sudo user and a key. Root SSH stays off after the key works. The hardening order is the same. The check is: The key session survives. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for AlmaLinux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.
Step 3 on AlmaLinux covers network. nmcli sets the lab address. firewalld allows the lab prefix. Do not import a Rocky firewall backup and hope. The check is: Address and firewall match the ticket. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for AlmaLinux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.
Step 4 on AlmaLinux covers SELinux. Enforcing at the start and at the end. A migrated host sometimes arrives permissive. Put it back on purpose. The check is: getenforce is Enforcing. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for AlmaLinux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.
Step 5 on AlmaLinux covers updates. dnf update using Alma repos only. A leftover CentOS or Rocky repo line is removed or explained. The check is: dnf repolist matches the ticket. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for AlmaLinux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.
# AlmaLinux lab. Review before you paste.
# dnf from Alma repositories.
# firewalld, SELinux Enforcing, NetworkManager.
# Lab address 192.0.2.10/24 via 192.0.2.1.
# prompt-for-this is not a password to keep.
The commands you will actually repeat
dnf from Alma repositories, a read of the transaction, a reboot when the kernel asks, and a version note. The patch ring applies.
firewall-cmd permanent rules and a reload, reviewed. nmcli for addresses. hostnamectl for the name.
If software is missing, check the Alma version's repositories before you enable a third-party repo. CodeReady or similar names differ by major version. Read the name.
Keep a note of whether this host was migrated from CentOS Linux. Migrated hosts deserve a boot test and a look at leftover repositories.
What AlmaLinux is not
AlmaLinux is not Rocky Linux and not RHEL support.
It is not CentOS Stream and not Fedora.
It is not Ubuntu. apt does not belong here.
The hour you stop
Write the hostname, the role, and the clock time before you change AlmaLinux. If this host is also serving users, it is not the lab and this first hour belongs on a spare. The provisioning guide is how the spare gets built. A change without a spare is a change you can still postpone.
Keep the console or the out-of-band path open for the whole hour. Reloading a network service, a firewall, or a secure-shell daemon from the only session is how a lab becomes a drive across town. The hardware guide names that path for a physical machine. A virtual machine uses the hypervisor console. A cloud instance uses the serial console the platform gives you. Test it before the reload, not after.
The address 192.0.2.10/24 and the gateway 192.0.2.1 are documentation. They belong in the lab note and nowhere else. On a real network, use the prefix the network desk already assigned. On a cloud instance, use the address the platform assigned and do not hard-code the documentation range into user-data. If a generator filled the documentation address into a production draft, delete it.
prompt-for-this is a reminder that a secret is missing. It is not a password you set, not a token you commit, and not a string you leave in a configuration file because the service started. The real secret lives in the password store. The ticket says who can read it. A file that still contains the reminder is a file you have not finished.
One service is enough for the first hour on AlmaLinux. The purpose from the fundamentals page says which service. Every other package stays uninstalled until its own guide has a ticket. A host that enables a web server, a database, and a queue in the first hour has three changes and no proof. Finish the login, the address, and the update. Then stop.
Read the package transaction before you accept it. A count of packages is not a review. If the list contains a repository you did not add, stop. If it contains a kernel, the patch guide's reboot decision applies and the console stays open. If it contains software this role does not need, remove that line from the plan rather than installing it and disabling it later.
The previous image, the previous configuration file, or the previous package version is the rollback. Write the path down while the host still works. A rollback you invent after a failed reload is a guess. The migration guide assumes the old copy is still there. Do not delete it in the same hour to free a disk.
When the checks pass, copy the notes into the ticket and leave the host alone. The next host waits until a second person can repeat the login and the address from the notes. A fleet built from memory drifts. A fleet built from the file the provisioning guide stored stays boring, which is the point of AlmaLinux in production.
If a step on AlmaLinux fails twice, stop for the day. The failure is the result. Adding a forum command beside a half-applied config produces a host nobody can rebuild. Rebuild from the image instead. The time you lose is smaller than the time you will spend explaining the hybrid.
Hand the finished lab to the guide that matches the role: web, mail, storage, backup, or hardening. AlmaLinux being installed is not the same as the role being ready. The role guide has its own proof. Do not skip it because the package manager exited without an error.
A second person reads the hostname, the address, and the rollback path aloud before you build the next host. If they cannot find those three in the ticket, the notes are not done. Silence is not agreement. The check is the sentence they repeat back.
Store the working notes next to the image version. A month from now AlmaLinux will still boot from that pair, and the chat where you remembered a flag will be gone. The file is the memory. The host is replaceable. That is the whole point of writing this hour down.
AlmaLinux checks before a second host
Confirm this before you call the change done: AlmaLinux is the OS the hostname reports, not a neighbour you copied from. The lab address 192.0.2.10/24 is gone before this host is placed on a real network. prompt-for-this is not the password that was set, and no password is in the ticket. The named admin can log in with a key. The package manager used is the one this page names. A network file from a different distribution was not pasted in. The config test or the apply command for this network tool succeeded. The previous image or install file is kept. No new third-party repository was added in the first hour. A service you do not need was not enabled to see what it does. Console or out-of-band access works before you reload SSH. A second person read the hostname and the address. os-release says AlmaLinux. Repolist has no Rocky or Stream lines unless the ticket explains a temporary mirror. SELinux is Enforcing. And a migrated host had its boot and repo list reviewed. If one of those fails, stop.
Tools for this guide
These tools run in the browser on this site. They do not log into your machines.
- AlmaLinux Initial Server Setup Script Generator
- AlmaLinux Static IP Configuration Script Generator
- AlmaLinux Change Hostname Script Generator
Related pillar guides
Guides in this cluster
These supporting pages belong to this pillar.
- Cheat Sheet: AlmaLinux Commands Cheat Sheet
- Troubleshooting: AlmaLinux Troubleshooting Guide
- How-To: Initial Server Setup on AlmaLinux
- How-To: How to Set a Static IP on AlmaLinux
- How-To: How to Change the Hostname on AlmaLinux
- How-To: How to Create a Sudo User on AlmaLinux
- How-To: How to Harden SSH on AlmaLinux
- How-To: How to Set Up firewalld on AlmaLinux
- How-To: How to Add a Package Repository on AlmaLinux
- How-To: How to Enable Automatic Security Updates on AlmaLinux
- How-To: How to Set Timezone and NTP on AlmaLinux
- How-To: How to Add Swap Space on AlmaLinux
- How-To: How to Add and Mount a New Disk on AlmaLinux
- How-To: How to Set Up LVM on AlmaLinux
- How-To: How to Extend the Root Filesystem on AlmaLinux
- How-To: How to Set Up an NFS Server on AlmaLinux
- How-To: How to Mount an NFS Share on AlmaLinux
- How-To: How to Set Up a Samba File Share on AlmaLinux
- How-To: How to Install a LAMP Stack on AlmaLinux
- How-To: How to Install a LEMP Stack on AlmaLinux
- How-To: How to Install Docker on AlmaLinux
- How-To: How to Install Node.js on AlmaLinux
- How-To: How to Install Python on AlmaLinux
- How-To: How to Install Java on AlmaLinux
- How-To: How to Install a Let's Encrypt SSL Certificate on AlmaLinux
- How-To: How to Set Up Fail2ban on AlmaLinux
- How-To: How to Configure SELinux on AlmaLinux
- How-To: How to Upgrade AlmaLinux to the Next Release
- How-To: How to Update the Kernel on AlmaLinux
- How-To: How to Set Up Remote Desktop (xrdp) on AlmaLinux
- How-To: How to Disable IPv6 on AlmaLinux
- How-To: How to Join AlmaLinux to Active Directory
- How-To: How to Forward Logs with rsyslog on AlmaLinux
- How-To: How to Set Up Network Bonding on AlmaLinux