Skip to main content

Posts

Showing posts from March, 2022

Migrate CentOS8 to Rocky Linux 8

  The following steps will migrate your CentOS8 server to Rocky Linux 8. dnf -y install wget wget https://raw.githubusercontent. com/rocky-linux/rocky-tools/ main/migrate2rocky/ migrate2rocky.sh chmod a+x migrate2rocky.sh ./migrate2rocky.sh -r rm -rf /etc/yum.repos.d/backups /etc/yum.repos.d/CentOS-Linux- AppStream.repo.rpmsave /etc/yum.repos.d/CentOS-Linux- BaseOS.repo.rpmsave sync && init 6   That's it.

Migrate from CentOS7 to CentOS8

    The following steps will migrate a CentOS7 server to CentOS8. yum -y install epel-release yum -y install yum-utils rpmconf rm -f /etc/ issue.net ; mv /etc/issue.net.rpmsave /etc/ issue.net rpmconf -a # 5 times N rm -rf /etc/yum.repos.d/reece.repo yum clean all package-cleanup --orphans | egrep 'noarch|x86_64' | xargs -r -n 1 yum -y remove package-cleanup --leaves | egrep 'noarch|x86_64' | xargs -r -n 1 yum -y remove # do above until none found - leaves 4-5 times yum install -y dnf dnf remove -y yum yum-metadata-parser rm -Rf /etc/yum dnf -y upgrade dnf -y 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 cd /etc/yum.repos.d && mkdir backups && mv CentOS-* backups tee CentOS-Linux-BaseOS.repo<<

Migrate from RHEL7 to CentOS7

    The following steps will convert a RHEL7 Linux server to CentOS7.   yum -y remove rhnlib redhat-support-tool redhat-support-lib-python rpm -e --nodeps redhat-release-server rpm -e --nodeps redhat-logos rpm -e --nodeps yum rpm -e redhat-indexhtml-7-13.el7. noarch rpm -qa | egrep -i "rhn|redhat" rm -rf /usr/share/doc/redhat-release/ /usr/share/redhat-release/   mkdir tmp && cd tmp curl -O http://mirror.centos.org/ centos/7/os/x86_64/RPM-GPG- KEY-CentOS-7 curl -O http://mirror.centos.org/ centos/7/os/x86_64/Packages/ yum-plugin-fastestmirror-1.1. 31-54.el7_8.noarch.rpm curl -O http://mirror.centos.org/ centos/7/os/x86_64/Packages/ yum-3.4.3-168.el7.centos. noarch.rpm curl -O http://mirror.centos.org/ centos/7/os/x86_64/Packages/ centos-release-7-9.2009.0.el7. centos.x86_64.rpm curl -O http://mirror.centos.org/ centos/7/os/x86_64/Packages/ centos-logos-70.0.6-3.el7. centos.noarch.rpm rpm --import RPM-GPG-KEY-CentOS-7 rpm -Uvh *.rpm yum clean all yum