This tutorial describe how to upgrade from CentOS 7.9 to CentOS 8.2.
Things to be consider while performing the upgrade from CentOS 7.9 to CentOS8.2 👇👇👇
- Always do full backup your system before upgrade
- Actual scenario might have different situation
- Make sure, all the configured repositories should be updated and able to update package for CentOS 8
- This is an unofficial, unsupported procedure !
Here are the commands for upgrade from CentOS 7.9 to CentOS 8.2 👇👇👇
Install the EPEL Repository, if it is not configured
yum install epel-release -y
Install yum-utils Tools
yum install yum-utils -y
Resolves RPM packages
yum install rpmconf -y
rpmconf -a
Perform a clean-up of all the packages which don't require
package-cleanup --leaves; package-cleanup --orphans
Install dnf package in CentOS7
yum install dnf -y
Remove yum package manager
dnf -y remove yum yum-metadata-parser
rm -Rf /etc/yum
Upgrading CentOS7 using dnf
dnf upgrade -y
Install CentOS 8 Release package (centos-linux-repos, centos-linux-release, centos-gpg-keys)
dnf install -y vault.centos.o... vault.centos.o... vault.centos.o...
Adjusting CentOS-Linux-BaseOS Repo to avoid any error
mv /etc/yum.repos.d/CentOS-Linux-BaseOS.repo /etc/yum.repos.d/CentOS-Linux-BaseOS.repo.original
vi /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
[baseos]
name=CentOS Linux $releasever - BaseOS
baseurl=vault.centos.o...
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Upgrade EPEL and Remi Repository
dnf -y upgrade dl.fedoraproje... rpms.remirepo....
Removing all temporary package files
dnf clean all
Removing old Kernel code of CentOS 7
rpm -e `rpm -q kernel`; rpm -e --nodeps sysvinit-tools
CentOS8 system upgrade
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
Install new Kernel Core for CentOS 8
dnf -y install kernel-core kernel
Install CentOS 8 Minimum Package
dnf -y groupupdate "Core" "Minimal Install"
Optionally, install Server with GUI with following command
dnf -y groupupdate "Server with GUI" "Server"
Install grub2, if does not installed
dnf install grub2 -y
Install GRUB into MBR
lsblk
Install GRUB in the device displayed from above command.
grub2-install /dev/sda
Make GRUB Configuration file
grub2-mkconfig -o /boot/grub/grub.cfg
reboot the system to start the system into CentOS 8
reboot
View the current version
cat /etc/centos-release
28 сен 2024