Rocky Linux

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

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!

Alaric Bird

Alaric Bird is a seasoned Linux System Administrator with over a decade of experience in managing and optimizing Linux-based servers and infrastructure. Known for his expertise in server deployment, security hardening, and performance tuning, Alaric has a deep understanding of various Linux distributions, including Ubuntu, CentOS, and Red Hat Enterprise Linux. His skills extend to cloud platforms like AWS, where he effectively manages virtual private servers and services. Alaric is also proficient in scripting languages such as Bash and Python, which he uses to automate routine tasks, enhancing efficiency and reliability. With a strong commitment to continuous learning, he stays updated with the latest developments in open-source technologies and best practices. His problem-solving abilities, combined with excellent communication skills, make him a valuable asset to any IT team. In addition to his technical expertise, Alaric is passionate about mentoring junior administrators and fostering a collaborative environment.

Recent Posts

Puppy Linux: Fast and Simple OS

Puppy Linux is a fast, lightweight OS designed for speed and simplicity, perfect for old…

1 day ago

Change Apache Document Root in Linux

Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…

2 weeks ago

How to Change Apache Port in Linux

Discover how to change Apache port in Linux easily. Follow our simple guide to modify…

2 weeks ago

How to Create Virtual Host in Apache Server

Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…

3 weeks ago

10 Practical Tasks for RHCSA Exam with Solutions

Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…

3 weeks ago

Ultimate Fail2ban Configuration Guide

Discover the ultimate Fail2ban configuration guide. Learn how to set up, customize, and optimize Fail2ban…

4 weeks ago

This website uses cookies.