Update RHEL5 using YUM package via CentOS online sources

Compelling reasons why anyone would want to do this is that your trial period has expired, your support agreement has expired and you do not want to renew it, your system may be outdated, you want to install another application, or you just wanted to see if it could be done.

Before continue reading, after testing this exercise and applying all the system updates, the system is now CentOS 5.4. However, Red Hat still lingers, when performing a YUM update. In which case, the update will provide the error that you do not have access to the Red Hat channels, however, will continue to perform the update. So, in other words, this Linux build will become a Frankenstein build.

Find all YUM packages

# rpm -qa |grep yum

Delete current YUM package

# rpm -e  --nodeps yum

Download the following CentOS RPMs

wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-3.2.22-20.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm

Extract the RPM Pacakges

# rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm yum-3.2.22-20.el5.centos.noarch.rpm --force --nodeps

Download the CentOS Base Repository

# wget http://sudone.com/download/CentOS-Base.repo -O /etc/yum.repos.d/CentOS-Base.repo

Update your system

# yum update

Tested and works May 5, 2010. The result, a Red Hat Enterprise Linux 5.4 that is updating wit YUM using the CentOS repositories.

rhel5-yum

Source: Using YUM package via CentOS online sources in RHEL5