Home Rocky LinuxHow to Install Rocky Linux 9: A Step-by-Step Guide

How to Install Rocky Linux 9: A Step-by-Step Guide

by Knowledge Base Linux
Install Rocky Linux 9 on a modern data center server

Rocky Linux has become the go-to replacement for CentOS after Red Hat ended the classic CentOS releases. It is a community-driven, enterprise-grade distribution that is 1:1 bug-for-bug compatible with Red Hat Enterprise Linux (RHEL). In this guide you will learn how to install Rocky Linux 9 from scratch on a physical server, a virtual machine or a VPS, step by step, including the choices you should make in the installer and the first commands to run after the initial boot.

Why Install Rocky Linux 9?

Rocky Linux 9 is based on RHEL 9 and is supported with updates until 2032. It ships with kernel 5.14, OpenSSL 3, Python 3.9 and modern tooling, and it uses DNF as its package manager. Compared with a rolling distribution, Rocky gives you a predictable, stable platform for web hosting, databases, file servers and lab environments. If you are coming from CentOS, everything will feel familiar: systemd, firewalld and SELinux are all there and work the same way.

Prerequisites to Install Rocky Linux 9

  • A server, VM or VPS with at least 2 GB of RAM (4 GB recommended for a graphical install) and 20 GB of free disk space.
  • The Rocky Linux 9 ISO image for your architecture (x86_64 or aarch64).
  • A USB drive of at least 4 GB if you install on physical hardware, or console/KVM access to your VPS.
  • A stable internet connection for updates during and after the installation.

Step 1: Download the ISO and Verify the Checksum

Download the DVD or Minimal ISO from the official site. The Minimal ISO (around 1.6 GB) is the best choice for servers because it installs a lean system without a desktop.

wget https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9-latest-x86_64-minimal.iso
wget https://download.rockylinux.org/pub/rocky/9/isos/x86_64/CHECKSUM
sha256sum -c CHECKSUM 2>/dev/null | grep Rocky

Verifying the checksum matters: a corrupted download is the most common reason an installation fails halfway. The command should report OK for the ISO you downloaded.

Bootable USB used to install Rocky Linux 9 on a rack server

Step 2: Create a Bootable USB or Attach the ISO

On Linux, write the image to a USB drive with dd (double-check the device name with lsblk first, this erases the drive):

sudo dd if=Rocky-9-latest-x86_64-minimal.iso of=/dev/sdX bs=4M status=progress conv=fsync

On Windows you can use Rufus or balenaEtcher. On a VPS, mount the ISO through the provider’s control panel and boot from it. Many providers also offer a ready-made Rocky Linux 9 template, which is fine, but installing from the ISO teaches you the layout decisions described below.

Step 3: Install Rocky Linux 9 with the Anaconda Installer

Boot the machine and select Install Rocky Linux 9 from the boot menu. After choosing your language, you reach the Installation Summary screen. Work through these items:

Keyboard, Language and Time

Set your keyboard layout and open Time & Date to pick your region and enable Network Time so the server clock stays correct.

Software Selection

Choose Minimal Install for a headless server. You can always add packages later with DNF, and a minimal base is easier to secure and update.

Installation Destination

Select the target disk. For most servers the automatic partitioning with LVM is fine. If you want a separate /home or a dedicated data volume, choose “Custom” and create the partitions manually. Always keep at least a few GB free in the volume group so you can extend filesystems later.

Network & Host Name

Turn the network interface On and set a meaningful hostname such as server1.example.com. If your network uses static IPs, click Configure and enter the address, gateway and DNS servers.

User Settings

Set a strong root password, then create an administrative user, tick Make this user administrator, and set its password. Day-to-day work should be done with this user and sudo, not with root directly.

Click Begin Installation. When it finishes, click Reboot System and remove the installation media.

Step 4: First Boot and Basic Configuration

Log in and confirm the release, then apply all updates:

cat /etc/rocky-release
sudo dnf upgrade -y
sudo dnf install -y vim curl wget bash-completion tar

Set the timezone if you skipped it in the installer, and check that time synchronisation is active:

sudo timedatectl set-timezone Asia/Ho_Chi_Minh
timedatectl status

Finally, make sure the firewall is running and SSH is reachable before you log out:

sudo systemctl enable --now firewalld
sudo firewall-cmd --list-services

By default the ssh service is allowed, so remote access works. Our guide on how to SSH into a Linux server covers the client side in detail.

Troubleshooting Common Installation Problems

  • Installer cannot see the hard disk: in the BIOS/UEFI, switch the storage controller to AHCI mode, or load the RAID driver. In VMs, attach the disk to a virtio or SATA controller.
  • Boot fails with Secure Boot errors: use a signed ISO and keep Secure Boot enabled, or temporarily disable it in the firmware settings.
  • No network after installation: open nmtui, edit the connection and tick “Automatically connect”.
  • The system boots to a black screen: this usually only affects graphical installs; add nomodeset to the kernel line or install with the Minimal profile.

Conclusion

You now know how to install Rocky Linux 9 from the official ISO, make the right choices in Anaconda and complete the basic first-boot configuration. The official documentation at docs.rockylinux.org is an excellent reference for deeper topics. Your next steps should be securing the machine: continue with our guide on the Rocky Linux 9 server setup and hardening to create a safe baseline before you deploy any services.

You may also like

KbLinux

Typically replies within a day

Hello, Welcome to the site. Please click below button for chatting me through Telegram.