La machine Source
[root@Centos07 ~]# uname -a Linux Centos07 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@Centos07 ~]# cat /etc/centos-release CentOS Linux release 7.9.2009 (Core)
[root@Centos07 ~]# httpd -v Server version: Apache/2.4.6 (CentOS) Server built: Oct 19 2021 13:53:40
Prérequis
[root@Centos07 ~]# yum update -y [root@Centos07 ~]# yum install epel-release -y
Installation des Paquets nécessaires
[root@Centos07 ~]# yum install -y yum-utils rpmconf [root@Centos07 ~]# rpmconf -a
Nettoyage des paquets
[root@Centos07 ~]# package-cleanup --leaves
[root@Centos07 ~]# package-cleanup --orphans
[root@Centos07 ~]# yum remove bind-libs-lite-9.11.4-26.P2.el7_9.7.x86_64 libsysfs-2.1.0-16.el7.x86_64 kernel-3.10.0-957.el7.x86_64 -y
Mise en place de DNF Repository
[root@Centos07 ~]# yum install -y dnf [root@Centos07 ~]# dnf remove -y yum yum-metadata-parser [root@Centos07 ~]# rm -Rf /etc/yum [root@Centos07 ~]# dnf makecache
Upgrade Centos7 via DNF
[root@Centos07 ~]# dnf upgrade -y
Ajout des Repository Centos8 via DNF
[root@Centos07 ~]# dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/{centos-linux-repos-8-2.el8.noarch.rpm,centos-linux-release-8.4-1.2105.el8.noarch.rpm,centos-gpg-keys-8-2.el8.noarch.rpm}
[root@Centos07 ~]# dnf clean all
Upgrade epel-release Centos8
[root@Centos07 ~]# dnf upgrade -y epel-release
Supprimer les paquets obsolètes
[root@Centos07 ~]# dnf remove dracut-network [root@Centos07 ~]# dnf remove sysvinit-tools [root@Centos07 ~]# dnf remove python3*
Supprimer le Kernel Centos7
[root@Centos07 ~]# rpm -e `rpm -q kernel` --nodeps
Upgrade Centos7 vers Centos8
[root@Centos07 ~]# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync [root@Centos07 ~]# dnf install -y kernel-core [root@Centos07 ~]# reboot
/
Check Migration Centos8
[root@Centos07 ~]# cat /etc/centos-release CentOS Linux release 8.4.2105 [root@Centos07 ~]# uname -a Linux Centos07 4.18.0-305.25.1.el8_4.x86_64 #1 SMP Wed Nov 3 10:29:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@Centos07 ~]# httpd -v Server version: Apache/2.4.37 (centos) Server built: Oct 12 2021 23:35:12
Views: 13