Install Rocky Linux 8 [Step-by-Step with Screenshots]

Install Rocky Linux 8 on Oracle Virtual Box

With CentOS 8 support ending on December 31, 2021, A new Operating System has been born thanks to the open-source community. Rocky Linux is a community Linux operating system that is compatible with RedHat Enterprise Linux 8 (RHEL 8). This means that CentOS users will not be worried anymore as they are covered with this 100% bug-for-bug Operating System.

Rocky Linux is already available for download and can already be used as an alternative to run your production workloads. At the moment of writing this article, the latest version of Rocky Linux is version 8.4.

Advertisement

This guide covers how to install Rocky Linux 8.4 on VirtualBox. We assume that you already have the VirtualBox application installed in your lab environment. You can also install Rocky Linux 8 on different virtualization platforms such as VMWare, XEN. This operating system can also be installed on a physical host.

The steps below will guide us on how to install Rocky Linux 8 on VirtualBox.

 

Pre-requisites

This article assumes that you already downloaded and installed Oracle Virtual Box on your workstation and you have basic working knowledge of Oracle Virtual Box.

 

Step 1: Download Rocky Linux ISO

Download the latest version of Rocky Linux ISO image available on the Rocky Linux 8 release page.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

Choose an ISO image to download depending on the CPU architecture of your environment. Select the Minimal version if you wish to install Rocky Linux 8 server version and DVD if you want to install the Desktop version of Rocky Linux 8.

You can also download these images using WGET feature on Linux terminal as shown below:

Advertisement
# CLI download with wget
# DVD
curl -O https://download.rockylinux.org/pub/rocky/8.4/isos/x86_64/Rocky-8.4-x86_64-dvd1.iso

# Minimal ISO
curl -O https://download.rockylinux.org/pub/rocky/8.4/isos/x86_64/Rocky-8.4-x86_64-minimal.iso

# Network install ISO
curl -O https://download.rockylinux.org/pub/rocky/8.4/isos/x86_64/Rocky-8.4-x86_64-boot.iso

Once the installation is complete, proceed to the next step which involves creating the resources on VirtualBox.

 

Step 2: Create a New Virtual Machine on Virtual Box

Open your VirtualBox application and proceed to create a new Virtual Machine. In the Tools menu, click "New" or press CTRL+N to initiate the creation of a new VM.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

2.1: Configure Name and Operating System

On the interface that pops up:

  1. Allocate the VM a name
  2. Choose the Machine Folder where the VM's disk will reside
  3. Select Linux as the type of VM
  4. Choose Red Hat (64 bit) for the version.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

2.2: Allocate Memory to Rocky Linux VM on VirtualBox

Allocate Memory to the VM depending on the available resources on your host machine. A minimum of 1024MB for Rocky Linux server and 2048MB for Rocky Linux Desktop is advised. This is for the optimal working of the VMs. This however depends on the available resources on your host computer.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

2.3: Create a Virtual Hard disk for Rocky Linux on VirtualBox

Create a virtual hard disk for the Rocky Linux VM. Again, you are required to allocate the size of the disk depending on the available disk space on your host machine. The minimum disk recommended for the Rocky Linux VM is 8GB.

Select the "Create a virtual hard disk now" option then click "Create".

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

On the next menu, choose "VHD(Virtual Hard Disk)" then click "Next"

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

Choose the "Dynamically allocated" option to use Thin Provisioning.

Advertisement

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

Choose the disk size as discussed earlier. In my case, I'll use 20GB. Then click "Create".

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

Step 3: Configure Network for Rocky Linux on VirtualBox

We need to configure networking on the created VM to allow it to communicate with other VMs on VirtualBox or allow reachability from the outside network. Go to the Settings menu of the VM then choose Network to configure the network.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

VirtualBox provides several network adapters but the most commonly used adapters are briefly discussed below:

  1. NAT - Host machine translates network traffic to the VM using Network Address Translation(NAT).
  2. Bridged adapter - Bridges the network connections from the host adapters whereby the VM can communicate directly with other devices on the network. For the case of DHCP enabled network, the VM will be able to obtain an IP directly from the DHCP server. You however need to map the network interface with a host adapter that is currently active. For example, if you are using WIFI on your host machine, ensure that the virtual network adapter is attached to the WIFI adapter of the host machine.
  3. Internal network - This can be used to create a different kind of software-based network which is visible to selected virtual machines, but not to applications running on the host or to the outside world.
  4. NAT Network. A NAT network is a type of internal network that allows outbound connections. This means that you can also reach a VM with a NAT Network adapter from the host machine.

 

3.1: Using Bridged Adapter on VirtualBox

To use a bridged adapter:

  1. Choose "Bridged Adapter" option for "Attached to" entry.
  2. Select the host network adapter that you wish to bridge
  3. Turn through the advanced options to do any more changes to the adapter. The is optional.
  4. Ensure that you have checked the "Enable Network Adapter" box.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

Step 4: Attach Rocky Linux 8 ISO Image to VirtualBox VM

  • The next step is to attach the ISO image we downloaded at Step 1 to the VirtualBox VM we have created.
  • Head over to the VM's settings, click on Storage then click on the "Controller: IDE".
  • To insert an ISO image, click on the "Empty" entry as shown in the image below then click on the icon on the right at the Optical Drive option.
  • Select the "Choose a disk file..." option to locate your ISO image.
  • Navigate to the folder where the image was downloaded then choose the image.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

Step 5: Allocate vCPU to VirtualBox VM

On the VM settings, navigate to System then Processor. Here, You can configure the CPU architecture for the Rocky Linux VM. You can also configure the number of vCPUs the VM will have.
If you want to use virtualization inside virtualization, enable the Nested VT-x/AMD-V option as shown below;

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

Step 6: Install Rocky Linux on VirtualBox

After the VM configuration, we can proceed to install Rocky Linux 8 on VirtualBox. Click on the Start icon to boot the VM.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.1: Select boot device

You will be taken to the Boot device selection menu. At this point, choose the ISO image that we had mounted earlier then start.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

You will be greeted with the Rocky Linux installer menu where you will be required to choose to Install Rocky Linux. Choose the option highlighted below to initiate the installation process for Rocky Linux 8.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.2: Select Language

Once the installer loads the files, you will be presented with a Graphical interface where you will be required to choose your Language as shown below:

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.3: Select Date and Time

Select your preferred language then proceed to the next page. Configure TimeZone at the Time & Date option.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.4: Configure Partition

Configure disk partitioning at the "Installation Destination" tab.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

Choose automatic partitioning for the disk to automatically partition the root disk.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.5: Configure network and hostname

Configure the hostname and the Network under Network & Hostname settings.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

In the network settings, configure the hostname and click Apply.

Switch on the network adapter to connect to a network. If you used a bridged network, the VM should pick network configurations from your DHCP server.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.6: Create password for root user

Should you want to configure static network settings, use the "configure" button to access the manual network interface configuration. Add a root password for Rocky Linux root user.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.7: Begin Rocky Linux 8 Installation

Use a strong password for the root user then click "Done" to proceed with the installation. Click on Begin Installation to initiate the installation process.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

The installation process should take some time before it completes. This also depends on the type of installation (minimal, DVD, network) that you are doing.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.8: Reboot the VM post installation

The fastest installation is for a minimal installation as this installs only the bare-minimum requirements for a Rocky Linux server. You will be required to download and install other software packages after a complete installation of the operating system.

You will be prompted to reboot your system once installation is complete:

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.9: Boot into Rocky Linux Kernel

When you reboot, the mounted ISO image unmounts itself automatically and the VM boots from the Operating System installed on the virtual hard disk.

Rocky Linux boots to a shell where you can now login.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

 

6.10: Login to Rocky Linux after installation

Use the root password that you configured during the installation.

Install Rocky Linux 8 [Step-by-Step with Screenshots]

There you go. You can proceed to install updates and other applications that you wish to deploy.

# dnf update -y

 

Conclusion

In this guide, we have demonstrated how to deploy Rocky Linux 8.4 on VirtualBox. You can go on and try the latest version of Rocky Linux which is 8.4. As discussed, it is clear that Rocky Linux is the replacement of the much-loved CentOS whose support will end on December 31, 2021.  Consider moving your applications which are currently running on CentOS to Rocky Linux. In our next guide, we shall cover how to migrate from CentOS to Rocky Linux 8.

Didn't find what you were looking for? Perform a quick search across GoLinuxCloud

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can either use the comments section or contact me form.

Thank You for your support!!

2 thoughts on “Install Rocky Linux 8 [Step-by-Step with Screenshots]”

Leave a Comment