Hamsa K
Editor
5 min read | 6 months ago

How to Migrate from Centos 8 to Centos Stream

Migrating from centos 8 to centos stream

The future of the CentOS Project is CentOS Stream, and over the next year they are shifting focus from CentOS Linux, the rebuild of Red Hat Enterprise Linux (RHEL), to CentOS Stream.CentOS Project that it is ending the life of traditional CentOS version which we all have been using for a long time.

If you are running CentOS 8 on your Servers then you need to migrate your Server to CentOS 8 Stream version before the end of 2021.If you plan to upgrade from CentOS 7 to CentOS 8, you can skip or avoid upgrading to CentOS 8 as CentOS 7 will get support until 2024.In this article we will show you how to migrate from centos 8 server to centos stream.

Its better to take backup of important data before migrating, just in case.

Step 1: update using dnf

First we need to update centos 8 version using dnf.

sudo dnf update

 After update check version of centos.

[root@localhost ~]# cat /etc/centos-release
CentOS Linux release 8.3.2011

Also Read -> How to Configure NIC bonding on Centos 7

Step 2: Install centos stream

Now we need to install the CentOS 8 Stream release repositories using below command.

dnf install centos-release-stream

output:

[root@localhost ~]# dnf install centos-release-stream
Last metadata expiration check: 2:35:36 ago on Mon 08 Mar 2021 04:44:55 AM EST.
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                                                                                      28 kB/s |  11 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   7.9 kB/s |  11 kB     00:01
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 products updated.
Installed:
  centos-release-stream-8.1-1.1911.0.7.el8.x86_64
Complete!

Also Read -> How to Install Apache CouchDB on Centos 8

Step 3: Replace repository

Replace all existing CentOS Linux repositories with CentOS Stream repositories

sudo dnf swap centos-{linux,stream}-repos

output:

[root@localhost ~]# dnf swap centos-{linux,stream}-repos
CentOS-Stream - AppStream                                                                                                               1.3 MB/s | 6.6 MB     00:05
CentOS-Stream - Base                                                                                                                    748 kB/s | 2.3 MB     00:03
CentOS-Stream - Extras                                                                                                                  6.4 kB/s | 8.9 kB     00:01
Last metadata expiration check: 0:00:01 ago on Mon 08 Mar 2021 07:29:48 AM EST.
Dependencies resolved.
========================================================================================================================================================================
 Package                                          Architecture                      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
 centos-stream-repos                              noarch                            8-2.el8                              extras                                    19 k
Removing:
 centos-linux-repos                               noarch                            8-2.el8                              @BaseOS                                   26 k
Transaction Summary
========================================================================================================================================================================
Install  2 Packages
Remove   1 Package
Total download size: 40 k
Is this ok [y/N]: y

Also Read ->  How to Install Odoo 14 on Centos 8

Step 4: migrate centos linux to centos stream

Now migrate CentOS Linux 8 to CentOS Stream 8 with following command.

sudo dnf distro-sync

This will take some time to upgrade and downgrade the packages. Once the CentOS Stream 8 migration is completed, run the following command.

[root@localhost ~]# cat /etc/redhat-release
CentOS Stream release 8

That's it. now you have successfully migrated from centos 8 to centos stream.



Warning! This site uses cookies
By continuing to browse the site, you are agreeing to our use of cookies. Read our terms and privacy policy