Migrating Red Hat Server to CentOS
This one is to convert a Red Hat 7.X machine to CentOS 7.X machine.
https://www.openlogic.com/blog/step-step-migration-rhel-74-centos-74
This one covers several different convert/upgrade options, but I was looking at the RH 5.X to CentOS 5.X and 6.X to 6.X conversion parts. 7.X is very similar to 6.X.
https://wiki.centos.org/HowTos/MigrationGuide
Now, Red Hat and CentOS 5.X is only in extended support right now, so you have to find the RPS in the vault, so below are the commands I used to convert.
# cp /etc/redhat-release /etc/redhat-release-saved # rpm -e --nodeps redhat-release-notes redhat-release yum-rhn-plugin redhat-logos # rpm -ivh \ http://vault.centos.org/5.7/os/i386/CentOS/centos-release-5-7.el5.centos.i386.rpm \ http://vault.centos.org/5.7/os/i386/CentOS/centos-release-notes-5.7-0.i386.rpm \ http://vault.centos.org/5.7/os/i386/CentOS/redhat-logos-4.9.99-11.el5.centos.noarch.rpm # yum update
The last command won't work, since it will be pointing to the main repo mirror. You will want to change the /etc/yum.repos.d/CentOS-Base.repo file to look like below. I used 5.11, as that is the last version, but you could pick another one, if desired.
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS- - Base baseurl=http://vault.centos.org/5.11/os/x86_64/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #released updates [updates] name=CentOS- - Updates baseurl=http://vault.centos.org/5.11/updates/x86_64/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that may be useful [extras] name=CentOS- - Extras baseurl=http://vault.centos.org/5.11/extras/x86_64/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that extend functionality of existing packages [centosplus] name=CentOS- - Plus baseurl=http://vault.centos.org/5.11/centosplus/x86_64/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #contrib - packages by Centos Users [contrib] name=CentOS- - Contrib baseurl=http://vault.centos.org/5.11/contrib/x86_64/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5