CentOS has, until recently, been a downstream rebuild of Red Hat Enterprise Linux. Being binary compatible with RHEL made it very useful for anyone who wanted to develop applications for RHEL for free. But using CentOS for development of RHEL applications meant that development had to wait weeks or sometimes months for the most recent RHEL release to be downloaded, built and rebranded as CentOS, and then distributed before applications could be updated and tested.
Back in 2014, CentOS was purchased by Red Hat. In fact, since CentOS is an open-source project, it was really that Red Hat bought the trademark for CentOS and hired many of the people who were working on it, effectively taking ownership of the entire project. Then, in September 2019, Red Hat announced that it was creating a new CentOS version, called CentOS Stream, and inserting it into the development pipeline between Fedora and RHEL. Admittedly, this was a bit confusing.
However, this month – December 2020 – it became clear what the objective was creating the new CentOS Stream project when it announced that Red Hat would be terminating its financial support of downstream CentOS 8. This is a decision that was hailed by some and angered others.
What Really Happened?
Most of the confusion about the recent announcement pertaining to CentOS 8 comes from the reuse of the CentOS name. CentOS 8 Stream really is different from CentOS 8 because the former is upstream compared to RHEL and the latter is downstream. This basically means that new bug fixes and features are released in CentOS before they get to RHEL instead of after.
The team who had been working on CentOS 8 never really had an option to send patches, fixes, and features into the RHEL pipeline. Prior to CentOS 8 Stream, the only way to give input to RHEL was to work on RHEL directly as a Red Hat employee, or to contribute to Fedora, whose changes would only be released into the next RHEL major version (e.g. RHEL 9). But now that CentOS 8 Stream is directly upstream from RHEL, contributors can have an impact on the next minor release of RHEL, allowing their feedback to guide the current RHEL major version. This is a great benefit for developers working on OS-level applications and libraries.
Furthermore, CentOS 8 Stream is a better development platform for those wanting to run their applications on RHEL 8. Development for the next RHEL minor release can now be done in advance of the RHEL release instead of having to wait for weeks or months after the release for CentOS 8 to be built and distributed.
It really is a win-win for developers.
But, as I said, many people are angry. As far as I can tell, the people who are most upset about the recent announcement to abandon CentOS 8 at the end of 2021 are those people who were using CentOS 8 for production. Some small businesses and academics rely on CentOS 8 for their applications. But since bug releases and security fixes were always delayed getting into CentOS 8, those who are using CentOS 8 for their production systems are exposing themselves to a great deal of risk – even before commenting on the lack of support SLAs for CentOS 8.
Let’s Upgrade Already!
You probably didn’t come here to hear about the changes in CentOS 8 Stream. You came here because the article title said that you can upgrade/migrate from CentOS 8 to CentOS 8 Stream. So let’s do that!
Start with your existing CentOS 8 server. In this example, I am using a freshly-installed CentOS 8 virtual machine.
[root@centos8 ~]# cat /etc/os-release NAME="CentOS Linux" VERSION="8 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="8"
Although it’s probably not strictly necessary, it’s always a good idea to make sure your system is up-to-date before trying any sort of migration.
[root@centos8 ~]# dnf update Last metadata expiration check: 0:18:51 ago on Wed 30 Dec 2020 06:12:24 PM UTC. Dependencies resolved. ======================================================================================= Package Arch Version Repository Size ======================================================================================= Installing: centos-linux-release noarch 8.3-1.2011.el8 BaseOS 22 k replacing centos-release.x86_64 8.2-2.2004.0.1.el8 replacing centos-repos.x86_64 8.2-2.2004.0.1.el8 kernel x86_64 4.18.0-240.1.1.el8_3 BaseOS 4.3 M kernel-core x86_64 4.18.0-240.1.1.el8_3 BaseOS 30 M kernel-modules x86_64 4.18.0-240.1.1.el8_3 BaseOS 26 M Upgrading: NetworkManager x86_64 1:1.26.0-9.el8_3 BaseOS 2.4 M NetworkManager-libnm x86_64 1:1.26.0-9.el8_3 BaseOS 1.7 M [CLIP]
Once your CentOS 8 system is up-to-date, reboot before the next step.
[root@centos8 ~]# reboot
Now we need to install the CentOS 8 Stream release repositories.
[root@centos8 ~]# dnf install centos-release-stream Last metadata expiration check: 0:00:55 ago on Wed 30 Dec 2020 06:47:45 PM UTC. Dependencies resolved. ======================================================================================= Package Architecture Version Repository Size ======================================================================================= Installing: centos-release-stream x86_64 8.1-1.1911.0.7.el8 extras 11 k Transaction Summary Install 1 Package Total download size: 11 k Installed size: 6.6 k Is this ok [y/N]: y Downloading Packages: centos-release-stream-8.1-1.1911.0.7.el8.x86_64.rpm 24 kB/s | 11 kB 00:00 --------------------------------------------------------------------------------------- Total 15 kB/s | 11 kB 00:00 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : centos-release-stream-8.1-1.1911.0.7.el8.x86_64 1/1 Verifying : centos-release-stream-8.1-1.1911.0.7.el8.x86_64 1/1 Installed: centos-release-stream-8.1-1.1911.0.7.el8.x86_64 Complete!
Some articles online will tell you that all you have to do now is update, but actually that won’t suffice. That will only serve to update any packages that might be older. It will not actually make your system match what’s in the CentOS 8 Stream repositories. For that, we need the distro-sync command.
[root@centos8 ~]# dnf distro-sync CentOS-Stream - AppStream 4.5 MB/s | 6.4 MB 00:01 CentOS-Stream - Base 1.3 MB/s | 2.4 MB 00:01 CentOS-Stream - Extras 4.5 kB/s | 7.0 kB 00:01 Dependencies resolved. ======================================================================================= Package Arch Version Repository Size ======================================================================================= Installing: centos-stream-release noarch 8.4-1.el8 Stream-BaseOS 21 k replacing centos-linux-release.noarch 8.3-1.2011.el8 replacing centos-release-stream.x86_64 8.1-1.1911.0.7.el8 kernel x86_64 4.18.0-259.el8 Stream-BaseOS 5.0 M kernel-core x86_64 4.18.0-259.el8 Stream-BaseOS 31 M kernel-modules x86_64 4.18.0-259.el8 Stream-BaseOS 27 M Upgrading: NetworkManager x86_64 1:1.30.0-0.4.el8 Stream-BaseOS 2.5 M NetworkManager-libnm x86_64 1:1.30.0-0.4.el8 Stream-BaseOS 1.8 M [CLIP]
Once that process is done, you will see that the OS-release is now CentOS 8 Stream.
[root@centos8 ~]# cat /etc/os-release NAME="CentOS Stream" VERSION="8" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Stream 8" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://centos.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
And don’t forget to reboot!
[root@centos8 ~]# reboot
For anyone who is developing applications to run on Red Hat Enterprise Linux 8, CentOS 8 Stream really is a blessing since you now have access to a stable operating system on which your application will eventually run. Also, if your development process uncovers any OS bugs, then your fixes and suggestions will find their way into the next minor release of RHEL and won’t have to wait for the next major release.