Table of Contents
In this article, I will take you through the steps to migrate CentOS 8 to CentOS Stream 8 in 6 Easy Steps. As you might be aware of the recent announcement by CentOS Project that it is ending the life of traditional CentOS version which we all have been using for a long time. As per the announcement CentOS Stream will be future of CentOS Project. CentOS as we know it is the rebuild Red Hat Enterprise Linux(RHEL).
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. After the end of CentOS 8, CentOS Stream will continue to work more like a development branch of Red Hat Enterprise Linux(RHEL). You can read full announcement here.
Migrate CentOS 8 to CentOS Stream 8 in 6 Easy Steps
Also Read: 26 iostat, vmstat and mpstat command examples to Monitor Linux Performance
Step 1: Prerequisites
a) You need to have a running CentOS 8
System.
b) You should have dnf
tool installed in your Server. You can check 31 Useful DNF Command Examples for RPM Package Management in Fedora/RHEL/CentOS to know more about dnf
command.
c) You need to have root
or sudo
access to run privileged commands. Please Check How to Add User to Sudoers to know more about providing sudo
access to the User.
Step 2: Update Your Server
If you have not updated your packages from long time then it is always recommended to first install all the latest available releases using dnf update -y
command as shown below.
[root@localhost ~]# dnf update -y CentOS-8 - AppStream 3.9 kB/s | 4.3 kB 00:01 CentOS-8 - AppStream 546 kB/s | 6.2 MB 00:11 CentOS-8 - Base 500 B/s | 3.9 kB 00:07 CentOS-8 - Base 254 kB/s | 2.3 MB 00:09 CentOS-8 - Extras 1.5 kB/s | 1.5 kB 00:00 CentOS-8 - PowerTools 4.7 kB/s | 4.3 kB 00:00 CentOS-8 - PowerTools 885 kB/s | 2.0 MB 00:02 Extra Packages for Enterprise Linux Modular 8 - x86_64 6.3 kB/s | 8.8 kB 00:01 Extra Packages for Enterprise Linux Modular 8 - x86_64 12 kB/s | 98 kB 00:08 Extra Packages for Enterprise Linux 8 - x86_64 7.9 kB/s | 7.1 kB 00:00 Extra Packages for Enterprise Linux 8 - x86_64 1.7 MB/s | 8.6 MB 00:05 Google Cloud SDK 461 B/s | 844 B 00:01 Google Cloud SDK 4.2 MB/s | 23 MB 00:05 Remi's Modular repository for Enterprise Linux 8 - x86_64 2.2 kB/s | 3.5 kB 00:01 Remi's Modular repository for Enterprise Linux 8 - x86_64 160 kB/s | 707 kB 00:04 Safe Remi's RPM repository for Enterprise Linux 8 - x86_64 3.6 kB/s | 3.0 kB 00:00 Safe Remi's RPM repository for Enterprise Linux 8 - x86_64 223 kB/s | 1.6 MB 00:07 RPM Fusion for EL 8 - Free - Updates 4.0 kB/s | 3.7 kB 00:00 RPM Fusion for EL 8 - Free - Updates 255 kB/s | 258 kB 00:01 Dependencies resolved. ======================================================================================================================================================================== Package Architecture Version Repository Size ======================================================================================================================================================================== Installing: centos-linux-release noarch 8.3-1.2011.el8 BaseOS 22 k replacing centos-release.x86_64 8.1-1.1911.0.9.el8 replacing centos-repos.x86_64 8.1-1.1911.0.9.el8 kernel-core x86_64 4.18.0-240.1.1.el8_3 BaseOS 30 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 NetworkManager-team x86_64 1:1.26.0-9.el8_3 BaseOS 141 k NetworkManager-tui x86_64 1:1.26.0-9.el8_3 BaseOS 320 k alsa-lib x86_64 1.2.3.2-1.el8 AppStream 469 k ansible noarch 2.9.15-1.el8 epel 17 M apr x86_64 1.6.3-11.el8 AppStream 125 k audit x86_64 3.0-0.17.20191104git1c2f876.el8 BaseOS 254 k audit-libs x86_64 3.0-0.17.20191104git1c2f876.el8 BaseOS 116 k bash x86_64 4.4.19-12.el8 BaseOS 1.5 M bind-export-libs x86_64 32:9.11.20-5.el8 BaseOS 1.1 M bind-libs x86_64 32:9.11.20-5.el8 AppStream 172 k bind-libs-lite x86_64 32:9.11.20-5.el8 AppStream 1.2 M bind-license noarch 32:9.11.20-5.el8 AppStream 101 k bind-utils x86_64 32:9.11.20-5.el8 AppStream 444 k brotli x86_64 1.0.6-2.el8 BaseOS 322 k ca-certificates noarch 2020.2.41-80.0.el8_2 BaseOS 391 k centos-gpg-keys noarch 1:8-2.el8 BaseOS 12 k certbot noarch 1.9.0-1.el8 epel 48 k chkconfig x86_64 1.13-2.el8 BaseOS 194 k container-selinux noarch 2:2.144.0-1.module_el8.3.0+475+c50ce30b AppStream 49 k
Step 3: Check Your Current CentOS 8 Version
Before installing CentOS 8 Stream let's check the current CentOS version by using cat /etc/redhat-release command as shown below. Here you can see current version is CentOS 8.1.1911
[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 8.1.1911 (Core)
Step 4: Migrate CentOS 8 to CentOS Stream
Next step is to install centos release stream using dnf install centos-release-stream -y command as shown below.
[root@localhost ~]# dnf install centos-release-stream -y Last metadata expiration check: 0:06:19 ago on Sun 13 Dec 2020 04:46:53 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 Downloading Packages: [MIRROR] centos-release-stream-8.1-1.1911.0.7.el8.x86_64.rpm: Status code: 500 for http://mirrors.piconets.webwerks.in/centos-mirror/8.3.2011/extras/x86_64/os/Packages/centos-release-stream-8.1-1.1911.0.7.el8.x86_64.rpm (IP: 43.240.66.200) centos-release-stream-8.1-1.1911.0.7.el8.x86_64.rpm 14 kB/s | 11 kB 00:00 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 6.7 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: centos-release-stream-8.1-1.1911.0.7.el8.x86_64 Complete!
Step 5: Synchronize Installed Packages
Now to synchronize all the installed packages with the latest version you need to use dnf distro-sync -y command as shown below. This will install all the packages required to upgrade the Server to CentOS Stream 8 version.
[root@localhost ~]# dnf distro-sync -y Last metadata expiration check: 0:01:34 ago on Sun 13 Dec 2020 11:01:23 AM EST. Dependencies resolved. ======================================================================================================================================================================== Package Architecture Version Repository Size ======================================================================================================================================================================== Installing: centos-stream-release noarch 8.4-1.el8 Stream-BaseOS 21 k replacing centos-release.x86_64 8.1-1.1911.0.9.el8 replacing centos-release-stream.x86_64 8.1-1.1911.0.7.el8 replacing centos-repos.x86_64 8.1-1.1911.0.9.el8 kernel-core x86_64 4.18.0-257.el8 Stream-BaseOS 31 M Upgrading: NetworkManager x86_64 1:1.30.0-0.3.el8 Stream-BaseOS 2.5 M NetworkManager-libnm x86_64 1:1.30.0-0.3.el8 Stream-BaseOS 1.8 M NetworkManager-team x86_64 1:1.30.0-0.3.el8 Stream-BaseOS 142 k NetworkManager-tui x86_64 1:1.30.0-0.3.el8 Stream-BaseOS 323 k alsa-lib x86_64 1.2.4-3.el8 Stream-AppStream 471 k ansible noarch 2.9.15-1.el8 epel 17 M apr x86_64 1.6.3-11.el8 AppStream 125 k audit x86_64 3.0-0.17.20191104git1c2f876.el8 BaseOS 254 k audit-libs x86_64 3.0-0.17.20191104git1c2f876.el8 BaseOS 116 k avahi-libs x86_64 0.7-20.el8 Stream-BaseOS 62 k bash x86_64 4.4.19-12.el8 BaseOS 1.5 M bind-export-libs x86_64 32:9.11.20-6.el8 Stream-BaseOS 1.1 M
Step 6: Check CentOS Version
Once CentOS 8 Stream is installed you can again check the CentOS version by using cat /etc/redhat-release command as shown below. Here you can see the current version as CentOS Stream release 8
. This confirms your upgrade is successful !!
[root@localhost ~]# cat /etc/redhat-release CentOS Stream release 8
Popular Recommendations:-
Practical Steps to Install iostat and mpstat command on Linux(RHEL/CentOS 7/8)
16 Fdisk command examples to Manage Disk Partitions in Linux
How to Convert/Change time to epoch time using date utility on Linux/Unix Server
How to Install jq(JSON Processor) on RHEL/CentOS 7/8
7 Simple Steps to Install MTR(My Traceroute) on Linux(RHEL/CentOS 7/8)
How to Install Arpwatch tool on RHEL/CentOS 7/8(Simple and Effective Steps)