# # Centos 7 => 8 manual upgrade. # No support is given, YMMV, remember backups! # Tested with upcloud and cloudatcost. # # Get ready to upgradeyum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum -y install rpmconf yum-utils # Resolve all config stuff.rpmconf -a # Packages you might not need/require, remove if something doens't seem to be required.package-cleanup --leaves package-cleanup --orphans # Install DNF. yum -y install dnf # Remove yumdnf -y remove yum yum-metadata-parser rm -Rf /etc/yum # Upgrade system to be up-to-datednf -y upgrade # Install new versions: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 # Upgrade EPELdnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm # Dnf cleandnf clean all # Remove kernels, kernel packages are kernel-core in c8.rpm -e `rpm -q kernel` # Remove definitely conflicting stuff.rpm -e --nodeps sysvinit-tools # Try to run the upgradednf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync # If it doesn't succeed (YMMV), fix dependency stuff by removing/installing conficting stuff and try again. # eg. if you want to drop all the dependencies #dnf remove python2-six python-six # eg. you don't want to drop all the dependencies, they would remove too much. #rpm -e --nodeps sysvinit-tools # Process new configsrpmconf -a # Ensure kernel is properly installedrpm -e kernel-core dnf -y install kernel-core # Make sure grub is updated (ensure that it's right place!)ROOTDEV=`ls /dev/*da|head -1`; echo "Detected root as $ROOTDEV..." grub2-install $ROOTDEV # Install new stuff that is in the Core/Minimum Install:dnf -y groupupdate "Core" "Minimal Install" # Install back the stuff that you need and removed to get the dnf distro-sync to succeed. # Reboot and Verifyuname -a # Linux teste-centos8 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linuxcat /etc/redhat-release # CentOS Linux release 8.0.1905 (Core)
Fontes
https://fedoraproject.org/wiki/Upgrading_Fedora_using_package_manager
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/upgrading_to_rhel_8/preparing-a-rhel-7-system-for-the-upgrade_upgrading-to-rhel-8
https://bugs.centos.org/view.php?id=16116