For the past few months, we’ve heard the news about the end of the CentOS Linux distribution project. The CentOS 8 will be the last version of the CentOS Linux project, which only gets support until the end of this year 2021. And by this time, we have a few Linux distro as an alternative of CentOS Linux 8 Stable, and among them is “Rocky Linux“.

Rocky Linux is an open-source Linux distribution created by the Rocky Linux project, led by Gregory Kurtzer, founder of the CentOS project. It’s a fork of CentOS and designed to be 100% binary compatible with RHEL. Rocky Linux provides an enterprise-grade operating system and production-ready Linux distribution.

In this guide, we will show you step-by-step how to install a 64-bit version of Rocky Linux 8.4 as a stand-alone server. Additionally, we will verify the installation by accessing the Rocky Linux server through SSH from another machine.

Prerequisites

  • An ISO file Rocky Linux 8.4. The download page provides two versions of ISO, minimal and DVD. We will use Rocky Linux minimal ISO.
  • Installation media. For the live machine hardware installation, you will need a USB drive for your media installation. But for the virtual machine (VM) installation such as KVM and VirtualBox, you can just go with the ISO file.
  • Disk at least 20GB (for testing purpose). For production, you need larger disk space.

Download and Verify ISO File

First, download the ISO file of Rocky Linux (Minimal or DVD version). Then verify the file you downloaded to make sure it’s not corrupt.

1. Download Rocky Linux 8.4 Minimal using the command below.

wget https://download.rockylinux.org/pub/rocky/8.4/isos/x86_64/Rocky-8.4-x86_64-minimal.iso

2. For the Rocky Linux DVD version, download using the following command.

wget https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.4-x86_64-dvd1.iso

3. Once your ISO file is downloaded, run the following command to download the checksum file.

wget https://download.rockylinux.org/pub/rocky/8.4/isos/x86_64/CHECKSUM

After that, you can verify your ISO file using the sha256sum command as below.

sha256sum -c CHECKSUM --ignore-missing Rocky-8.4-x86_64-minimal.iso

Now you will see a similar output as below.

Rocky-8.4-x86_64-minimal.iso: OK

The verification is complete, and the ISO file is not corrupt. Now you can create a USB media bootable using a tool such as UNetbootin or dd command, or if you want to install it as a virtual machine, you’re ready to go.

Boot your machine to the ISO file or USB drive installation media. During the booting process, you see a black screen with a list of menus.

1. Select the “Install Rocky Linux 8” menu and press “Enter” to continue.

<img alt="Install Rocky Linux 8.4" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/1-installing-rocky-linux.png611a89898e142.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="351" loading="lazy" src="data:image/svg xml,” width=”750″>

Now you will see some boot messages and the anaconda installer messages. Once the boot process is complete, you will get the Rocky Linux Welcome Page.

Choose Installation Language

1. On the Rocky Linux welcome page, choose your preferred language for the installation and click “Continue“.

<img alt="choose language for installation of rocky linux" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/2-choose-language-english.png611a8989b6182.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="500" loading="lazy" src="data:image/svg xml,” width=”750″>

In the next window, you will see the Rocky Linux “Installation Summary” page. Which inform you to complete four different stages for the Rocky Linux installation.

  • LOCALIZATION: You will be setting up the keyboard layout, languages, date, and time.
  • SOFTWARES: You will be configuring the Rocky Linux installation source and choosing which software packages you want to install.
  • SYSTEM: You will be setting up the partition for the Rocky Linux installation destination. And then setting up the hostname and network.
  • USER SETTINGS: You will be setting up the new user and the root password.

<img alt="Installation summary" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/3-installation-summary.png611a8989e0ea1.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="511" loading="lazy" src="data:image/svg xml,” width=”750″>

In the next stage, you will be configuring all of those four stages.

LOCALIZATION

Now you will be focusing on the “LOCALIZATION” stage.

1. Frist, click the “Keyboard” option.

<img alt="Setting up keyboard layout" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/4-setup-keyboard-layout.png611a898a24e13.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="329" loading="lazy" src="data:image/svg xml,” width=”469″>

The default keyboard layout configuration is “English (US)“. Click the “ ” button to add a new keyboard layout as your preferred keyboard, then click on “Done” to continue the installation.

<img alt="Add keyboard layout" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/5-choose-keyboard-layout.png611a898a5ef74.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="479" loading="lazy" src="data:image/svg xml,” width=”750″>

2. Next, click the “Language Support” option to add a new language.Advertisement

<img alt="set up language support" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/6-setup-language-support.png611a898a90d5d.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="340" loading="lazy" src="data:image/svg xml,” width=”474″>

As shown below, there are multiple versions of each language, and the default language configuration is “EnglishEnglish (United States)“.

To add a new language, click the base language you want to use and select the version as your preferred. Additionally, you can install multiple versions of the language by marking each version.

After that, click the button “Done to continue.

<img alt="Add language support" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/7-add-language-support.png611a898ac8545.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="494" loading="lazy" src="data:image/svg xml,” width=”750″>

3. Now click the “Time & Date” option.

<img alt="Set up time and date" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/8-setup-date-time.png611a898b0ae7f.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="345" loading="lazy" src="data:image/svg xml,” width=”471″>

Click the map to set up the “Region” and “City“. After that, you can adjust the time and date with your own at the bottom page. Optionally, you can choose the “Region” and “City” from each box.

Now click the button “Done” to continue and move to the second stage.

<img alt="setting up date and time" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/9-add-date-time.png611a898b5b805.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="508" loading="lazy" src="data:image/svg xml,” width=”750″>

SOFTWARE

On the “SOFTWARE” stage, you will be checking the Rocky Linux installation source and choosing the software packages you want to install.

1. Click on the “Installation Source” option.

<img alt="set up installation source of Rocky Linux" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/10-select-installation-source.png611a898b972ea.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="271" loading="lazy" src="data:image/svg xml,” width=”362″>

Now the installer will automatically detect the installation source media, click the “Verify” button and make sure the source for the installation is good and not corrupt.

<img alt="Verify the installation source" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/11-verify-installation-source.png611a898bd2bac.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="395" loading="lazy" src="data:image/svg xml,” width=”750″>

After that, click “Done“.

2. Next, click the “Software Selection” option.

<img alt="Select software packages" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/12-select-software-packages.png611a898c10c17.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="275" loading="lazy" src="data:image/svg xml,” width=”374″>

One the “Base Environment” section, select the option “Server” to use the Rocky Linux as a server machine.

On the right side “Additional software for Selected Environment” section, select additional software packages that you want to install.

<img alt="Choose software packages for the Rocky Linux Server" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/13-select-software-packages.png611a898c59026.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="476" loading="lazy" src="data:image/svg xml,” width=”750″>

Then click “Done” to save the configuration.

SYSTEM

At this stage, you will be configuring the partition for the installation destination and setting up the network IP address and hostname.

1. Click the “Installation Destination” option.

<img alt="set up installation destination of rocky linux" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/14-installation-destination.png611a898c958a6.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="427" loading="lazy" src="data:image/svg xml,” width=”368″>

The installer will automatically select the disk for the installation with the “automatic” storage configuration.

Change the default “Storage Configuration” to “Custom” and click “Done“.

<img alt="set up custom storage configuration and partition" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/15-custom-disk-installation.png611a898cdd393.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="479" loading="lazy" src="data:image/svg xml,” width=”750″>

Now you can create the custom partition for the Rocky Linux.

Leave the default partition scheme to LVM and click the “ ” button to create new partitions.

<img alt="Default partition schema LVM" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/16-create-partition.png611a898d31ba9.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="750" loading="lazy" src="data:image/svg xml,” width=”557″>

Now create three disk partitions, boot partition, root partition, and swap as following.

Boot partition: Mount Point: /boot – Desired Capacity: 1 GB

<img alt="create boot partition" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/17-create-boot-partition.png611a898d77840.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="315" loading="lazy" src="data:image/svg xml,” width=”445″>

Root partition : Mount Point: / – Desired Capacity: 17 GB

<img alt="Create root partition" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/18-create-root-partition.png611a898dadea2.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="309" loading="lazy" src="data:image/svg xml,” width=”436″>

Swap partition : Mount point: swap – Desired Capacity: 2 GB

<img alt="Create SWAP Partition" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/19-create-swap.png611a898deb058.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="313" loading="lazy" src="data:image/svg xml,” width=”446″>

Once you’ve created all those partitions, click “Done” to save the new partition configuration.

<img alt="Checking new partition configuration" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/20-double-check-partition.png611a898e37826.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="495" loading="lazy" src="data:image/svg xml,” width=”750″>

Double-check your configuration and click the “Accept Changes” button to apply.

<img alt="Apply new partition configuration" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/21-summary-disk-changes.png611a898e78a8d.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="408" loading="lazy" src="data:image/svg xml,” width=”750″>

2. Next, click the “Network & Host Name” option.

<img alt="Set up network and hostname" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/22-network-hostname-configuration.png611a898eab90c.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="433" loading="lazy" src="data:image/svg xml,” width=”398″>

The installer will automatically detect your network device. You need to “turn on” the network interface so you will get an IP address from your DHCP server.

Alternatively, click the “Configure” button to set up the IP address manually, choose the tab “IPv4 Configuration“.

After that, type the new name of your Rocky Linux machine on the “Host Name” box and click “Apply“.

<img alt="Set up network and hostname" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/23-setup-network-hostname.png611a898eec98c.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="494" loading="lazy" src="data:image/svg xml,” width=”750″>

Now click “Done” to continue to the next stage.

USER SETTINGS

At this stage, you will be setting up the root password and create a non-root user.

1. Click on the “Root Password” option.

<img alt="Setting up root password" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/24-create-root-password.png611a898f325b0.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="288" loading="lazy" src="data:image/svg xml,” width=”649″>

Now type your strong root password and repeat, then click the “Done” button.

<img alt="Type root password strong" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/25-create-strong-root-password.png611a898f7472a.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="173" loading="lazy" src="data:image/svg xml,” width=”750″>

2. After that, click the “User Creation” option to create a new user.

<img alt="Create new user" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/26-create-user.png611a898fac1e8.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="291" loading="lazy" src="data:image/svg xml,” width=”692″>

Type details full name, username, and password. Then select the option “Make this user administrator” to allow the user to run the “sudo su” command and get the root privileges.

<img alt="Create new user with administrator privileges" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/27-create-new-user-with-root-priv.png611a898fe38fb.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="265" loading="lazy" src="data:image/svg xml,” width=”750″>

Now click the “Done” button to complete the configuration.

Rocky Linux Installation Process

1. Double-check your installation configurations for each stage. After that, click the button “Begin Installation” to start Rocky Linux installation.

<img alt="Installation Summary Rocky Linux" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/28-installation-begin.png611a8990332ee.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="497" loading="lazy" src="data:image/svg xml,” width=”750″>

2. Below is the page of the Rocky Linux installation process.

<img alt="Rocky Linux Installation progress" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/29-rocky-linux-installation-progress.png611a899064f00.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="506" loading="lazy" src="data:image/svg xml,” width=”750″>

3. once the installation is complete, click the “Reboot System” button to restart the machine.

<img alt="Rocky Linux installation completed and Reboot the System" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/30-installation-complete.png611a8990ac4ad.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="515" loading="lazy" src="data:image/svg xml,” width=”750″>

4. Next, remove the installation media and boot to the default disk.

During the booting process, you will see the Rocky Linux grub as below.

<img alt="Rocky Linux GRUB" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/31-rocky-linux-grub.png611a8990e4aba.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="404" loading="lazy" src="data:image/svg xml,” width=”750″>

Select the Rocky Linux menu on top and press “Enter” to boot to the system.

Verify Rocky Linux Installation

To verify the Rocky Linux installation, you need to log in to the server and check the Rocky Linux version.

1. On the Rocky Linux login page, type your username and password. Then press “Enter” to log in to the system.

2. Now execute the following command to check the Rocky Linux version, kernel version, and the current user login.

uname -r

whoami

cat /etc/redhat-release

As seen below, you’ve installed the Rocky Linux 8.4 Green Obsidian.

<img alt="Rocky Linux Login" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/32-login-to-rocky-linux.png611a89917c327.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="311" loading="lazy" src="data:image/svg xml,” width=”750″>

Verify Sudo Root Privileges

1. To test the root sudo privileges, run the sudo command below.

sudo su

Type the password of your user and press “Enter“.

2. Now check the current user using the following command.

id

whoami

Once you get the root privileges, you should get similar output as below.

<img alt="Verify Root Sudo Privileges" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/33-check-sudo-root.png611a8991b6d6d.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="268" loading="lazy" src="data:image/svg xml,” width=”750″>

Verify SSH Service

1. Before checking the SSH service status, check the Rocky Linux server IP address using the following command.

sudo ip a

You will get similar output as below.

<img alt="Check IP Address server" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/34-check-ip-address.png611a89920607d.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="234" loading="lazy" src="data:image/svg xml,” width=”750″>

As seen on the screenshot, the Rocky Linux server gets an IP address “192.168.122.10“. You will be connecting to the server using this server’s IP address.

2. Next, verify the SSH service by executing the command below.

sudo systemctl status sshd

As seen below, the SSH service is active and running on default SSH port 22.

<img alt="Verify SSH Service" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/35-check-sshd-service.png611a89923e0be.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="223" loading="lazy" src="data:image/svg xml,” width=”750″>

3. Next, access the Rocky Linux server IP address from another machine using the ssh command as below.

ssh [email protected]

Type “yes” to confirm the server fingerprint, then type the password of your user and press “Enter“.

Once it’s successful, you will get the shell of the Rocky Linux server.

Next, execute the sudo command below and type the password of your user.

sudo su

Once your password is correct, you will get the root privileges.

<img alt="Login to Rocky Linux Server with SSH" data-ezsrc="https://kirelos.com/wp-content/uploads/2021/08/echo/36-login-ssh-rocky-linux.png611a89928ad46.jpg" ezimgfmt="rs rscb5 src ng ngcb5" height="302" loading="lazy" src="data:image/svg xml,” width=”750″>

Conclusion

Congratulations! you have successfully installed the Rocky Linux 8.4. Now you can update and upgrade all packages to the latest version. And after that, you’re ready to deploy your application on the Rocky Linux server.