Technology is rapidly evolving, and this change leads to new upgrades. CentOS is a great operating system that provides regular updates. This is why many users are looking for ways to upgrade their systems accordingly. So if you are one of them and want to upgrade from CentOS 7 to CentOS 8, then you have come to the right place. This article will walk you through the step-by-step process for successfully upgrading to CentOS 8.
How to upgrade from CentOS 7 to CentOS 8
Open a terminal and run the following command to install the EPEL repository:
$ yum install epel-release -y
Now the next step is to install the yum-util tools by running:
$ yum установить yum-utils
Run the following command to enable RPM packages:
$ yum install rpmconf $ rpmconf -a
Then remove any packages that are not required:
$ package-cleanup --leaves $ package-cleanup --orphans
CentOS uses the dnf package manager as its default package manager. To install it, we use this command:
$ yum install dnf
Removing the yum package manager:
$ dnf -y remove yum yum-metadata-parser $ rm -Rf /etc/yum
Upgrading CentOS 7 to CentOS 8 Using Package Manager
Update the system using dnf package manager:
$ dnf upgrade
Now use dnf to install the CentOS release package:
$ dnf install https://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/{centos-linux-repos-8-2.el8.noarch.rpm,centos-linux-release-8.4-1.2105.el8.noarch.rpm,centos-gpg-keys-8-2.el8.noarch.rpm}
Then update your installed EPEL repository:
$ dnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Remove all temporary files:
$ dnf clean all
Removing old kernel from CentOS 7: Then remove conflicting packages:
$ rpm -e `rpm -q kernel` $ rpm -e --nodeps sysvinit-tools
Then run the update for CentOS 8:
$ dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
Your system now requires a kernel, so install it by running this command:
$ dnf -y install kernel-core
Also install the minimal CentOS package:
$ dnf -y groupupdate "Core" "Minimal Install"
To confirm the current version, run this command:
$ cat /etc/redhat-release
Conclusion
Upgrading from CentOS 7 to CentOS 8 can be a great option if you want to take a fresh look at your system. CentOS 8 offers the latest features and options, so CentOS 8 is well worth an upgrade. We hope this article can provide valuable information on upgrading to CentOS 8. For more guides and tutorials, check out our website.