
Rocky Linux 9 is a major operating system that succeeds Rocky Linux 8 and offers improved security, better performance, and up-to-date software packages. Rocky Linux 9 also supports modern hardware with new Kernel features to improve system management and automate processes. Upgrading Rocky Linux 8 to Rocky Linux 9 ensures that your server is up to date and uses the latest security improvements.
This article explains how to upgrade from Rocky Linux 8 to Rocky Linux 9.
Before you begin:
Deploy a Rocky Linux 8 instance on Vultr.
Access the instance using SSH as a non-root user with sudo privileges.
Verify that your instance has at least 2GB of free space.
Your output should be similar to the one below:
Upgrading to Rocky Linux 9 can corrupt the existing server packages, which may be incompatible with the new operating system. A snapshot is a point-in-time copy that captures the instance's state and file system for versioning and backup purposes. Follow the steps below to take a new snapshot to recover your instance if the upgrade process fails.
Log in to the Vultr Console.
Click Products and select Compute on the main navigation menu.
Select your target Rocky Linux 8 instance to open its management page.
Navigate to the Snapshots tab.
Enter a new snapshot label in the Label field and click Take Snapshot.
Monitor the snapshot's progress and verify the status changes from Pending to Available.
You have created a new snapshot that you can use to recover your original instance incase the upgrade fails. If you're upgrading a local server, use backup tools such as rsync or tar for back up before starting the upgrade process.
Follow the steps below to test the compatibility of installed applications on your server.
Preparing your server involves upgrading all the existing packages for a smooth and successful upgrade. Follow the steps below to prepare the server before upgrading to Rocky Linux 9.
Update the server's package information index.
Upgrade all installed packages to the latest versions.
Remove any dependencies no longer required by the active packages.
Clear the DNF package manager cache to ensure a smooth upgrade process.
Follow the steps below to install the Rocky Linux 9 GPG keys, release, and repository packages to replace Rocky Linux 8 version on your server.
Visit the Rocky Linux 9 packages page to verify the latest versions to apply to your server. Then, install the latest rocky-release, rocky-repos, and rocky-gpg-keys packages.
Remove the rpmconf, yum-utils, and epel-release packages to avoid installation conflicts.
Remove the redhat-logos file to disable any branding changes.
Upgrade the server to Rocky Linux 9.
The above command starts the upgrade process. The --allowerasing option removes packages with dependency conflicts during the upgrade process.
Rebuild the database to switch from Rocky Linux 8's Berkeley DB toolkit to SQLite on Rocky Linux 9.
Reboot the server to apply changes.
Follow the steps below to test the upgraded Rocky Linux 9 server.
View the operating system release information and verify that it's Rocky Linux version 9.
Output:
Based on the above output, the Rocky Linux 9 version 9.4 (Blue Onyx) is the active operating system.
Test access to external services such as google.com using the Ping utility.
Follow the steps below to fix any possible issues you may encounter during the upgrade process.
List any conflicting modules that are incompatible with Rocky Linux 9.
Reset any modules with conflicts to their initial state. Replace module-name with the module name.
List all the obsolete packages.
Remove the obsolete packages. Replace package-name with your target package.
View the system logs and verify any errors or warnings on your server.
Your output should be similar to the one below.
The above error shows a syntax or configuration error in the /usr/lib/sysctl.d/50-redhat.conf file.
Open the /usr/lib/sysctl.d/50-redhat.conf file.
Find the following directive.
Comment and disable the directive by adding a # character at the beginning of the line.
Save and close the file.
Restart the systemd-sysctl service to apply the changes.
You have upgraded your server from Rocky Linux 8 to Rocky Linux 9. Rocky Linux offers enhanced performance and features that allow you to securely run applications. For more information about the upgrade process, visit the Rocky Linux forums.
0 Comments
Be the first to comment and share your perspective with the community.