keepcalculator

06 Numbers and Powers

Upgrade CentOS 7 to CentOS Stream 9: Full Guide

Card No. 06·66903 · Updated · Standard formula, shown below

You cannot directly upgrade CentOS 7 to CentOS Stream 9; you must do a clean reinstall or migrate to a different RHEL-compatible system. CentOS 7 reached end-of-life on June 30, 2024, meaning it no longer receives security updates, so moving off it is urgent. This guide explains your options, the risks, and the step-by-step process for a safe migration.

Why CentOS 7 Is No Longer Supported

CentOS 7 was originally a free, binary-compatible rebuild of Red Hat Enterprise Linux (RHEL) 7. Red Hat changed its strategy in December 2020, shifting focus from CentOS Linux (a downstream rebuild) to CentOS Stream (an upstream development branch). As a result, CentOS 7 was the last traditional CentOS release, and its support ended on June 30, 2024. After that date, no security patches, bug fixes, or updates are provided, leaving any remaining CentOS 7 systems exposed to known vulnerabilities.

Your Upgrade Path Options

Because there is no in-place upgrade tool from CentOS 7 to CentOS Stream 9, you have three realistic paths:

  • Clean install CentOS Stream 9 – The most straightforward option. Back up your data, install the new OS, and restore your applications.
  • Migrate to another RHEL-compatible distribution – Options like AlmaLinux OS, Rocky Linux, or Oracle Linux offer free, binary-compatible replacements for CentOS 7. Some provide migration scripts that can automate the conversion.
  • Upgrade to RHEL – Red Hat offers a paid conversion tool (Convert2RHEL) that can convert CentOS 7 to RHEL 7, then you can upgrade to RHEL 9. This requires a subscription.

Each option has trade-offs in cost, effort, and long-term support. For most users, a clean install of a current RHEL-compatible OS is the safest and simplest.

How to Perform a Clean Install of CentOS Stream 9

Before starting, ensure you have backups of all important data, configuration files, and a list of installed packages. The steps are:

  1. Back up your data – Copy home directories, databases, and configuration files (e.g., /etc) to external storage.
  2. Download the CentOS Stream 9 ISO – Get the installation image from the official CentOS project site.
  3. Create a bootable USB drive – Use tools like Rufus or dd to write the ISO to a USB stick.
  4. Boot from the USB – Restart your server, enter the boot menu (often F12 or Del), and select the USB drive.
  5. Follow the installer prompts – Choose your language, disk partitioning, and software selection. For a minimal server, choose “Minimal Install”.
  6. Set root password and create a user – Use a strong password and create a non-root user for daily work.
  7. Complete installation and reboot – Remove the USB and boot into your new system.
  8. Restore your data – Copy back your backups and reinstall any needed packages.

Migrating to AlmaLinux or Rocky Linux Instead

If you prefer to keep your existing server configuration and avoid a full reinstall, you can convert CentOS 7 to AlmaLinux 8 or Rocky Linux 8 using community-supported scripts. These distributions are designed as drop-in replacements for CentOS, so the conversion is mostly automated. The general process:

  1. Back up your system – Always create a full backup before any conversion.
  2. Download the conversion script – For AlmaLinux, use almalinux-deploy; for Rocky, use migrate2rocky.
  3. Run the script as root – The script replaces CentOS repositories with the new distribution’s and updates the system.
  4. Reboot – After the script finishes, reboot and verify that the OS shows the new distribution.

Note that these scripts convert CentOS 7 to the equivalent major version (e.g., AlmaLinux 8), not to the latest (9). You can then perform a major version upgrade later if desired. Always test the conversion on a non-production system first.

Common Problems and Pitfalls

Several issues frequently arise during migration:

  • Package incompatibilities – Some third-party repositories (like EPEL) may not have builds for the new OS version. You may need to disable or replace them.
  • Kernel and driver changes – Hardware that worked on CentOS 7 might not be supported by the newer kernel. Check hardware compatibility before migrating.
  • Application configuration drift – Configurations written for CentOS 7 may use outdated paths or settings. Review your application documentation.
  • Data loss due to missing backups – The most common and avoidable problem. Always have a verified backup.

Costs and Support Considerations

CentOS Stream 9 is free to use, but it does not offer the same long-term stability as RHEL. CentOS Stream receives updates continuously, so it may introduce changes that require more frequent attention. If you need a stable, production-grade OS with predictable updates, consider AlmaLinux or Rocky Linux, both free and backed by community or commercial support options. RHEL itself is paid but includes official support and a 10-year lifecycle.

Safety and Security After EOL

Running CentOS 7 after end-of-life is a serious security risk. Without security patches, any newly discovered vulnerabilities remain exploitable. If you cannot migrate immediately, isolate the system from the internet and restrict access as much as possible. However, this is only a temporary measure; plan your migration promptly.

Frequently Asked Questions

Can I upgrade CentOS 7 to CentOS Stream 8 first, then to 9?

No. CentOS Stream 8 also reached end-of-life on May 31, 2024, and there is no supported in-place upgrade path from CentOS 7 to any newer version. You must reinstall or convert to a different distribution.

Will my CentOS 7 applications work on CentOS Stream 9?

Most applications that run on CentOS 7 will work on CentOS Stream 9, but you may need to recompile or update them. The newer OS includes newer libraries and a different kernel, so test your applications thoroughly before migrating production systems.

Is there a free tool to convert CentOS 7 to RHEL?

Red Hat provides Convert2RHEL, but it requires a RHEL subscription. The tool is free to use, but you must have an active subscription to receive updates. For a completely free option, use AlmaLinux or Rocky Linux conversion scripts.

How long does the migration take?

A clean install typically takes 30-60 minutes, plus time to restore data and reconfigure applications. A conversion script may take 15-30 minutes, but you should budget additional time for testing.

What should I do with my CentOS 7 server right now?

If you cannot migrate immediately, disconnect it from the internet or place it behind a strict firewall. Take regular backups and plan to migrate as soon as possible. Do not use it for any internet-facing services.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →