Howto migrate centos7 to 8x: Difference between revisions
No edit summary |
Mandulete1 (talk | contribs) m (Protected "Howto migrate centos7 to 8x" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
||
(24 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
rhel alternatives or derivatives: | |||
* [https://rockylinux.org rockylinux] | |||
* [https://almalinux.org almalinux] | |||
* [https://www.openeuler.org/en/ openeuler] | |||
* [https://springdale.math.ias.edu springdale] | |||
cloud images: | |||
https://wiki.vidalinux.org/index.php/Linux_cloud_images | |||
distributions to migrate supported: | distributions to migrate supported: | ||
* CentOS 7 to AlmaLinux 8 | * CentOS 7 to AlmaLinux 8 | ||
Line 4: | Line 11: | ||
* CentOS 7 to Oracle Linux 8 | * CentOS 7 to Oracle Linux 8 | ||
* CentOS 7 to CentOS Stream 8 | * CentOS 7 to CentOS Stream 8 | ||
update centos7 repos to use vault.centos.org: | |||
yum update -y | sed -i -e '/^mirrorlist/d;/^#baseurl=/{s,^#,,;s,/mirror,/vault,;}' /etc/yum.repos.d/CentOS*.repo | ||
update to latest packages: | |||
yum update -y | |||
verify your current version: | verify your current version: | ||
cat /etc/centos-release | cat /etc/centos-release | ||
install elevate-release package: | install elevate-release package: | ||
yum install http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm -y | yum install http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm -y | ||
install leapp-upgrade and migration-data: | |||
Possible options are: | |||
* leapp-data-almalinux | |||
* leapp-data-centos | |||
* leapp-data-oraclelinux | |||
* leapp-data-rocky | |||
yum install leapp-upgrade leapp-data-almalinux -y | |||
start a preupgrade check: | |||
leapp preupgrade | |||
normally the check will fail, it’s normal because we need to do some tweaks: | |||
sudo rmmod pata_acpi | |||
echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config | |||
sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True | |||
then run check again: | |||
leapp preupgrade | |||
if everything runs well, upgrade the system: | |||
leapp upgrade | |||
once the migration is completed, you’ll be offered to reboot the system: | |||
reboot | |||
select the new entry in grub called ELevate-Upgrade-Initramfs, wait for the upgrade process to finish. | |||
when system is migrated to el8 run the following command to remove any el7 rpm package: | |||
rpm -qa|grep el7|xargs rpm -e | |||
= centos8 to almalinux8 = | |||
fix mirrors: | |||
sed -i -e '/^mirrorlist/d;/^#baseurl=/{s,^#,,;s,/mirror,/vault,;}' /etc/yum.repos.d/CentOS*.repo | |||
update your system to latest: | |||
yum update -y | |||
download deploy script: | |||
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh | |||
fix script permissions: | |||
chmod +x almalinux-deploy.sh | |||
run the script: | |||
bash almalinux-deploy.sh | |||
if an error ocurrs with signatures do the following: | |||
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux | |||
= almalinux8 to almalinux9 = | |||
* https://wiki.almalinux.org/elevate/ELevate-testing-guide.html | |||
= references = | |||
* https://wiki.almalinux.org/elevate/ELevate-quickstart-guide.html |
Latest revision as of 22:02, 3 October 2024
rhel alternatives or derivatives:
cloud images:
https://wiki.vidalinux.org/index.php/Linux_cloud_images
distributions to migrate supported:
- CentOS 7 to AlmaLinux 8
- CentOS 7 to Rocky Linux 8
- CentOS 7 to Oracle Linux 8
- CentOS 7 to CentOS Stream 8
update centos7 repos to use vault.centos.org:
sed -i -e '/^mirrorlist/d;/^#baseurl=/{s,^#,,;s,/mirror,/vault,;}' /etc/yum.repos.d/CentOS*.repo
update to latest packages:
yum update -y
verify your current version:
cat /etc/centos-release
install elevate-release package:
yum install http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm -y
install leapp-upgrade and migration-data:
Possible options are:
- leapp-data-almalinux
- leapp-data-centos
- leapp-data-oraclelinux
- leapp-data-rocky
yum install leapp-upgrade leapp-data-almalinux -y
start a preupgrade check:
leapp preupgrade
normally the check will fail, it’s normal because we need to do some tweaks:
sudo rmmod pata_acpi echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True
then run check again:
leapp preupgrade
if everything runs well, upgrade the system:
leapp upgrade
once the migration is completed, you’ll be offered to reboot the system:
reboot
select the new entry in grub called ELevate-Upgrade-Initramfs, wait for the upgrade process to finish.
when system is migrated to el8 run the following command to remove any el7 rpm package:
rpm -qa|grep el7|xargs rpm -e
centos8 to almalinux8
fix mirrors:
sed -i -e '/^mirrorlist/d;/^#baseurl=/{s,^#,,;s,/mirror,/vault,;}' /etc/yum.repos.d/CentOS*.repo
update your system to latest:
yum update -y
download deploy script:
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
fix script permissions:
chmod +x almalinux-deploy.sh
run the script:
bash almalinux-deploy.sh
if an error ocurrs with signatures do the following:
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux