decorative image for blog on centos migration strategy
March 25, 2024

Setting a CentOS Migration Strategy

Operating Systems
Open Source

With CentOS 7 end of life fast approaching, many organizations are considering their alternative support and/or CentOS migration options. The good news for those who are ready to migrate? There are a host of viable options available. Unfortunately, having so many choices can make choosing the right CentOS migration path difficult.

In this blog, we discuss CentOS migration considerations, and dive in on the viable paths organizations can follow to migrate their soon-to-be-EOL CentOS 7 deployments.

Back to top

Are You Ready to Migrate From CentOS?

Migrating to a new operating system can be a challenge, and that challenge only compounds with the complexity of a given system. But even setting aside that complexity, organizations have plenty of factors to consider before making a migration.

Establishing Benefit - The first and most important part of setting a CentOS migration strategy is determining the benefits of that migration. Will it save development time? Will it improve performance? Will it reduce security risk? Those benefits should be weighed against the expected expenditure for making that migration, and compared against the cost of using a third party for extended long term support in end of life.

Developer Time and Resources - Migrations take time. Depending on the complexity of the system, and the unforeseen obstacles experienced in the migration and accompanying integrations, the availability of requisite developer hours needed to migrate to a new OS can quickly become an impediment. Ensuring your development team has the bandwidth for a migration is key. It's also important to note that time spent on the migration is time not spent on developing new features, improving customer experience, or otherwise optimizing your systems. 

Internal Expertise - Establishing the developer time needed is important, but it's also important to keep in mind the expertise of the team performing that migration. Do they have the knowledge needed to solve problems as they arise? Or do you need a third party to help iron out the details?

Planning and Logistics - Another impact area for these migrations is in the planning and logistics. Even the act of planning a migration can take time and resources away from other focus areas. It's also important to consider the potential length of the migration. Will your migration occur before EOL? During EOL? If so, how will your team account for exposure to vulnerabilities while you're still on CentOS?

There are plenty of other considerations in planning a CentOS migration, but these high-level considerations are a good starting point for most organizations.

Need More Time on CentOS? Get Long-Term Support

For organizations that have recently migrated to CentOS 7, making another migration so soon may not be in the cards. For those teams, or for those who need more time to plan their CentOS migration, long-term support (LTS) offers a way to keep secure and supported until they're able to migrate.

Explore CentOS LTS

Back to top

Potential CentOS Migration Paths

There are plenty of viable CentOS migration paths. Each path carries its own benefits and unique challenges for migration. In the following sections, we highlight a few of those migration paths — including considerations for those migrations. To keep things simple, we will focus on migrations from the last community supported version of CentOS, CentOS 7. 

CentOS 7 to Rocky Linux Migration

If you're planning a CentOS to Rocky Linux migration, keep in mind that there is no Rocky Linux 7; that distribution started at 8. So this path is available, but entails upgrading to CentOS 8 first. There is a project called ELevate by AlmaLinux that covers upgrading from CentOS to Rocky Linux or AlmaLinux 8 (or 9). 

The Rocky Linux path covers migration from several distributions, such as RHEL, Oracle Linux, AlmaLinux, and CentOS. The migration is quick and easy, consisting of a shell script to run. It swaps out a few rpms, changes repos, then upgrades packages to bring the system up to the latest version. After rebooting, choose the Rocky Linux kernel and you're now operating on a Rocky Linux 8 system.

These scripts will generally skip third party packages that aren't part of the original distribution, but if all packages were part of the original system, it should work flawlessly.

CentOS 7 to CentOS Stream 9 Migration

Migrating from CentOS 7 to CentOS Stream is a valid migration path if you still want the latest distribution of CentOS. CentOS Stream is upstream of RHEL, but downstream of Fedora. However, for this migration, you will again need to migrate first from CentOS 7 to CentOS 8 (using ELevate as described above) since CentOS Stream started after EL 8. Once on CentOS 8, the migration itself involves only a couple of commands, and then a distro sync to update the system. At this point you are now on CentOS Stream, and will get regular, rolling updates.

CentOS 7 to AlmaLinux Migration

The AlmaLinux migration is nearly identical to the process for converting to Rocky Linux. You download a script, run it, and it switches and updates packages on the system. After rebooting, you choose the AlmaLinux kernel (which should be the default), and you are running AlmaLinux 8 (or 9). For more details, read this blog on how to plan a CentOS to AlmaLinux migration.

CentOS 7 to RHEL Migration

CentOS 7 to RHEL migration is possible, but has more steps. This is because RHEL uses a subscription manager and SSL certs to verify entitlements, and is not strictly a Yum repo. This means you must have a valid entitlement. While there is a conversion script provided by RHEL that you can install, you must provide information to the script to verify and get access to RHEL repo (such as activation ID or username and password).

Featured Video: CentOS Migration Tips

Other CentOS Migration Paths

There is, of course, the possibility of migrating to other entirely different types of systems, such as SUSE, Ubuntu, or Fedora, but none of those are directly compatible and would require a total rebuild. There are a few other distributions that are more closely aligned with CentOS, like VzLinux, which is used as a hypervisor style system for OpenVZ, which is more similar to containers than virtual machines.

Back to top

Final Thoughts

CentOS migrations can be a challenge for any organization. Luckily, there are plenty of viable migration paths available. Whether that's staying in the spirit of CentOS with Rocky Linux or AlmaLinux, moving to a rolling release distribution like CentOS Stream, or something a little different, companies should be able to find an option that matches their needs. 

Editor's Note: This blog was originally published on September 23, 2021 and was updated and republished on March 25, 2024. 

Additional Resources

Back to top