In this article, you will learn how to upgrade your Linux dedicated or virtual server from CentOS 7 to CentOS 8.
# yum install epel-release -y
# yum install yum-utils
After the above step, you now need to resolve the RPM packages by executing the commands:
# yum install rpmconf # rpmconf -a
Next, perform a clean up of all the packages you don’t require with the following commands:
# package-cleanup --leaves # package-cleanup --orphans
DNF is the default package manager in CentOS 8. Install it by executing the following command:
# yum install dnf
Now remove the yum package manager:
# dnf -y remove yum yum-metadata-parser # rm -Rf /etc/yum
First upgrade the dnf package manager:
# dnf upgrade
Next, install CentOS 8 release package using dnf as shown below. This will take a while.
# dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-repos-8.2-2.2004.0.1.el8.x86_64.rpm http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.2-2.2004.0.1.el8.x86_64.rpm http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.2-2.2004.0.1.el8.noarch.rpm
Next, upgrade the EPEL repository as follows:
# dnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Now, remove all the temporary files by executing the following command:
# dnf clean all
Remove the old CentOS 7 kernel core
# rpm -e `rpm -q kernel`
Then you need to remove all conflicting packages:
# rpm -e --nodeps sysvinit-tools
Thereafter, launch the CentOS 8 system upgrade as shown below:
# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
# dnf -y install kernel-core
You are now ready to install CentOS 8 minimal package:
# dnf -y groupupdate "Core" "Minimal Install"
The CentOS 7 to CentOS 8 upgrade task has been completed! You may issue the following command to verify:
# cat /etc/redhat-release
If you are a NetShop ISP Fully Managed Hosting Customer, you may simply drop an email to the Support team to upgrade your CentOS 7 server to CentOS 8. Alternatively, should you wish to perform the upgrade on your own feel free to use this article with the steps described above.
The procedure has been tested at NS Labs for the purposes of drafting this Linux tutorial.
© Copyright 2004-2020 S.S. NETSHOP INTERNET SERVICES LTD trading as “NetShop ISP”. All rights reserved.