How to upgrade Rocky Linux 8 to 9

Share on Social Media

Learn how to upgrade Rocky Linux 8 to 9 with our detailed step-by-step guide. Ensure a smooth and successful upgrade process for your Rocky Linux system today. #centlinux #linux #rockylinux

What is Rocky Linux?

Rocky Linux is a Linux distribution developed by Rocky Enterprise Software Foundation. It is intended to be a downstream, complete binary-compatible release using the Red Hat Enterprise Linux (RHEL) operating system source code. The project’s aim is to provide a community-supported, production-grade enterprise operating system. Rocky Linux, along with Red Hat Enterprise Linux and SUSE Linux Enterprise, has become popular for enterprise operating system use.

Rocky Linux 9.0, the latest version of the open source enterprise operating system designed to be fully bug-for-bug compatible with Red Hat Enterprise Linux (RHEL), is now generally available. The update includes new security and networking features, and a new open source build system called Peridot.

Released on 14 July 2022, Rocky Linux 9.0 has all of the build chain infrastructure tools for developers to pick up Rocky Linux or extend or reproduce the Operating system, should a developer want to do something independently of the community or any upstream supporting organization. A primary goal behind developing the new, cloud-native build system was assuring that new versions of Rocky can be released within one week of new RHEL version releases.

What’s new in Rocky Linux 9?

Some of the new features of Rocky Linux 9 are:

  • Rocky Linux 9 will be supported until May 31st, 2032
  • Ships with GNOME 40 as the default desktop environment
  • XFS now supports Direct Access (DAX) operations
  • NFS introduces the “eager write” mount option to help reduce latency
  • Rocky Linux 9 has many of the latest runtimes and compilers, including GCC 11.2.1, LLVM (13.0.1), Rust (1.58.1), and Go (1.17.1)
  • Python 3.9 will be supported for the entire lifecycle of Rocky Linux 9 and comes with many new features
  • Node.js 16 include an upgrade to the V8 engine to version 9.2
  • Ruby 3.0.3 provides several performance improvements, along with bug and security fixes
  • Perl 5.32 provides bug fixes and enhancements, including Unicode version 13
  • PHP 8.0 provides bug fixes and enhancements, including the use of structured metadata syntax
  • Root user authentication with a password over SSH has been disabled by default
  • OpenSSL 3.0 adds a provider concept, a new versioning scheme, and improved HTTPS
  • The Cockpit web console has an improved performance metrics page that helps identify causes of high CPU, memory, disk, and network resource usage spikes.

Recommended Book: How Linux Works, 3rd Edition: What Every Superuser Should Know (PAID LINK) by Brian Ward (Author)
Recommended Online Training: Learn Bash Shell in Linux for Beginners

745772 0021show?id=oLRJ54lcVEg&offerid=1074652.745772&bids=1074652

System Requirements

With Rocky Linux 9.0, some older CPUs will not work well, or perhaps at all. The following architectures are considered minimum requirements for a successful install:

  • AMD and Intel 64-bit architectures (x86-64-v2)
  • The 64-bit ARM architecture (ARMv8.0-A)
  • IBM Power Systems, Little Endian (POWER9)
  • 64-bit IBM Z (z14)

Environment Specification

We are using a minimal Rocky Linux 8 virtual machine with following specifications.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating System – Rocky Linux 8.6 (Green Obsidian)
  • Hostname – rockylinux-01.centlinux.com
  • IP Address – 192.168.116.128 /24

Updating Software Packages

By using a ssh client, connect with rockylinux-01.centlinux.com as root user.

Rebuild cache of enabled yum repositories.

# dnf makecache

Execute following dnf command to update software packages in your Rocky Linux server.

# dnf update -y

Gathering System Information

Here, you are going to upgrade Rocky Linux 8 to 9.

Therefore, it is good to note down the information about your existing system components before starting upgrade process.

Check versions of Linux operating system, Linux Kernel and other installed applications as follows.

# cat /etc/rocky-release
Rocky Linux release 8.6 (Green Obsidian)

# uname -r
4.18.0-372.16.1.el8_6.0.1.x86_64

# mysql -V
mysql  Ver 15.1 Distrib 10.3.32-MariaDB, for Linux (x86_64) using readline 5.1

# httpd -v
Server version: Apache/2.4.37 (rocky)
Server built:   Jun 22 2022 14:17:54

# php -v
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Upgrade Yum Repositories from Rocky Linux 8 to 9

For upgrading your yum repositories from Rocky Linux 8 to 9, you have to upgrade following three software packages.

  1. rocky-gpg-keys
  2. rocky-release
  3. rocky-repos

You can either download above software packages from Rocky Linux website.

Or you can execute following dnf command to install all three of them on your Linux operating system.

# dnf install -y https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/{rocky-gpg-keys-9.0-2.2.el9.noarch.rpm,rocky-release-9.0-2.2.el9.noarch.rpm,rocky-repos-9.0-2.2.el9.noarch.rpm}

You can safely ignore the warning during the execution of above command.

How to upgrade Rocky Linux 8 to 9

Now you can easily upgrade your Linux operating system by executing following command at Linux Bash prompt.

# dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync

Above command takes a couple of minutes to complete and successfully upgrades your server operating system from Rocky Linux 8 to 9. It also upgrade software applications and Linux Kernel as well.

In Rocky Linux 9, the RPM backend database format has been changed from Berkley Database Backend to SQLite.

Therefore, you need to rebuild your RPM database once to upgrade it to SQLite backend.

# rpm --rebuilddb
warning: Converting database from bdb_ro to sqlite backend

Reboot your Linux operating system with the new Linux kernel.

# reboot

Verify Software Versions after Upgrade

During system boot, you may observe the Old Linux Kernel 4.18 is still listed in the GRUB boot menu.

It is the default behavior of Linux operating system to keep two previous Kernels for fallback support.

Although if you don’t like it there, you can remove it by following our guide on how to remove old Linux kernels.

Check versions of Linux operating system, Linux Kernel and installed applications as follows.

# cat /etc/rocky-release
Rocky Linux release 9.0 (Blue Onyx)

# uname -r
5.14.0-70.17.1.el9_0.x86_64

# mysql -V
mysql  Ver 15.1 Distrib 10.5.13-MariaDB, for Linux (x86_64) using  EditLine wrapper

# httpd -v
Server version: Apache/2.4.51 (Rocky Linux)
Server built:   Mar 21 2022 00:00:00

# php -v
PHP 8.0.13 (cli) (built: Nov 16 2021 18:07:21) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.13, Copyright (c), by Zend Technologies

You can see that your Linux operating system along with Linux Kernel and installed applications has been upgraded from Rocky Linux 8 to 9.

Final Thoughts

Thank you for following our guide on how to upgrade Rocky Linux 8 to 9. We hope this tutorial has helped you achieve a smooth upgrade. If you need further assistance or customized support for your Rocky Linux upgrade, visit my Fiverr page here. Happy upgrading!

Leave a Comment