While CentOS 7 will reach its EOL in 2024-06-30 users will be required to migrate to CentOS Stream 8 at least. While there is no official option to upgrade to CentOS 9 Stream we will cover today only upgrading from CentOS 7 to CentOS 8 Stream.
In this tutorial I will asume you are using root user like me.
- Update CentOS 7 system to latest version
# yum -y update && reboot
- Ensure EPEL repository is installed
# yum -y install epel-release
- Install packages rpmconfig and yum-Utils then check configuration and cleanup not required ones
# yum -y install rpmconf yum-utils
# rpmconf -a
# package-cleanup --leaves
# package-cleanup --orphans
# reboot
- Prepare OS to use DNF (will replace yum)
# yum -y install dnf
# dnf -y remove yum yum-metadata-parser
# rm -Rf /etc/yum
# dnf -y update
- Upgrade to CentOS 8
# dnf install http://vault.centos.org/8.5.2111/BaseOS/x86_64/os/Packages/{centos-linux-repos-8-3.el8.noarch.rpm,centos-linux-release-8.5-1.2111.el8.noarch.rpm,centos-gpg-keys-8-3.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
- Upgrade from CentOS 8 to CentOS 8 Stream
# dnf update -y
# dnf install centos-release-stream
# dnf swap centos-{linux,stream}-repos
- Final step is to reboot newly upgraded system
# reboot
Need help migrating legacy infrastructure to supported Linux distributions?
→ Check out our Infrastructure Support Services
0 Comments