This guide will show you how to upgrade from CentOS/RHEL 7 to CentOS/RHEL 8 using the dnf package manager. We always recommend performing these kind of task in staging before going into production.
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum -y install rpmconf yum-utils rpmconf -a package-cleanup --leaves package-cleanup --orphans
yum -y install dnf dnf -y remove yum yum-metadata-parser rm -Rf /etc/yum dnf -y upgrade dnf -y install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-repos-8.2-2.2004.0.1.el8.x86_64.rpm
dnf -y install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.2-2.2004.0.1.el8.x86_64.rpm
dnf -y install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.2-2.2004.0.1.el8.noarch.rpm dnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm dnf clean all rpm -e `rpm -q kernel` rpm -e --nodeps sysvinit-tools
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync rpmconf -a rpm -e kernel-core dnf -y install kernel-coreVerify that grub is updated and in the right location:
ROOTDEV=`ls /dev/*da|head -1`; echo "Detected root as $ROOTDEV..." grub2-install $ROOTDEV
dnf -y groupupdate "Core" "Minimal Install"
cat /etc/centos-release
reboot
why did you use this: dnf -y upgrade http://mirror.bytemark.co.uk/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm
ReplyDeleteThank you for pointing it out....it has been fixed now.
Deletedoes this affect the existing accounts? or just to upgrade the OS from 7 to 8?
ReplyDeleteIt doesn’t effect existing accounts. The process is just to upgrade CentOS 7 to 8 keeping everything intact.
Delete