MODOP – Conversion Machine Centos7 vers RockyLinux 8.4

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

Migration Centos7 vers Centos 8

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

Supprime des paquets obsolètes

[root@Centos07 ~]# dnf remove dracut-network
[root@Centos07 ~]# dnf remove sysvinit-tools
[root@Centos07 ~]# dnf remove python3*

Supprime 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

Migration Centos8 vers RockyLinux

Récupération du script de Migration RockyLinux

[root@Centos7 ~]# dnf install wget
[root@Centos7 ~]# wget https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
[root@Centos7 ~]# chmod a+x migrate2rocky.sh

Lancer le script de Migration RockyLinux

[root@Centos7 ~]# ./migrate2rocky.sh -r

[root@Centos7 ~]# dnf -y upgrade
[root@Centos7 ~]# dnf erase yum
[root@Centos7 ~]# dnf distro-sync

Check Version RockyLinux

[root@Centos7 ~]# uname -a
Linux Centos7 4.18.0-305.25.1.el8_4.x86_64 #1 SMP Tue Nov 2 10:32:37 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@Centos7 ~]# cat /etc/rocky-release
Rocky Linux release 8.4 (Green Obsidian)
[root@Centos7 ~]# cat /etc/os-release

[root@Centos07 ~]# httpd -v
Server version: Apache/2.4.37 (rocky)
Server built: Oct 13 2021 02:29:38

Views: 15

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *