RHEL to CentOS Migration
Migration from RHEL5 to CentOS5
Copied from: Migration Guide
"All that you should need to do is install centos-release, remove redhat-release rpms and just yum update the machine, which should bring in all packages changed by CentOS ( since they will have a slightly higher E-V-R )." - per KaranbirSingh on centos-list You may also wish to remove the "rhnplugin" from yum (not necessary but gives an error msg) OR - per Craig White on centos-list Mon, 29 Oct 2007 (updated for 5.4)...
# cp /etc/redhat-release /etc/redhat-release-saved # rpm -e --nodeps redhat-release-notes redhat-release yum-rhn-plugin redhat-logos # rpm -ivh \ http://mirror.centos.org/centos/5/os/i386/CentOS/centos-release-5-4.el5.centos.1.i386.rpm \ http://mirror.centos.org/centos/5/os/i386/CentOS/centos-release-notes-5.4-4.i386.rpm \ http://mirror.centos.org/centos/5/os/i386/CentOS/redhat-logos-4.9.99-11.el5.centos.noarch.rpm # yum update
* Sometime the rpm install using a URL may be problematic. In that case use wget or lftpget to get local copies of the files and install with "rpm -ivh ...".
Note: It is only possible to pull the lastest 'point release' packages directory from the host: mirror.centos.org Older point release packages are relocated to: vault.centos.org and so for the foregoing example, we would use:
# 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.0/os/i386/CentOS/centos-release-5-0.0.el5.centos.2.i386.rpm \ http://vault.centos.org/5.0/os/i386/CentOS/centos-release-notes-5.0.0-2.i386.rpm
Installing yum
Copied from: CentOS Tips and Tricks
Okay, okay -- I get it -- it is not CentOS. But, I still want yum, or to try to remove and repair a crippled set of yum configurations.
First, take full backups and make sure they may be read. This may not work.
Then, you need the following package to get a working yum - all of which can be downloaded from any CentOS mirror:
* centos-release
You should already have this package installed. You can check that with
rpm -q centos-release centos-release-4-4.3.i386
If it is already on your system, please check that the yum configuration hasn't been pulled and is available on your system:
ls -l /etc/yum.repos.d/
This directory should contain only the files: CentOS-Base.repo and CentOS-Media.repo. If those aren't there, you should make a directory: 'attic' there, and 'mv' a backup of the current content into that attic, to prepare for the reinstall of the centos-release package:
rpm -Uvh --replacepkgs centos-release.*.rpm
If centos-release isn't installed on your machine, you can drop the --replacepkgs from the command above. Make a backup directory ./attic/ and move any other files present into it, so that you can back out of this proccess later, if you decide you are in 'over your head'.
Then you need the following packages:
CentOS 4 (available from where you also got the centos-release package):
* yum * sqlite * python-sqlite * python-elementtree * python-urlgrabber
CentOS 5 (available from where you also got the centos-release package):
* m2crypto * python-elementtree * python-sqlite * python-urlgrabber * rpm-python * yum
Download those into a separate directory and install them with
rpm -Uvh *.rpm
from that directory. As before, take a backup of /etc/yum.conf so that you might back out any changes.