Thursday, September 18, 2008

Installing Yum On RHEL 4

I have RHEL ES 4 at my office. It irritated me terribly as the machine was never updated and hence having very old versions of softwares. Therefore I decided to upgrade my RHEL ES 4 using yum.

From my work place, internet is only accessible through http proxy, that too with authentication. I tried using up2date by creating an account at redhat's site but it didn’t work( I thought you could update one machine using your redhat account).

The first problem I encountered was that there is no public repository to update RHEL machines i.e you have to pay for it. After googling for a while I discovered that CentOS offers public repositories and they work with RHEL 4 as well.

I downloaded latest yum rpm, installed it and configured it to use centOS repo. Every time I ran yum, it failed. It couldn’t find repomd.xml file in the CentOS repositories I provided in yum.conf.

After struggling for some time, I discovered that I was accessing older version of repos through the latest yum. Therefore I had to use an older version of yum with RHEL 4, since old repos do not support xml based updating.

Now I have a fully updated system. Following is the brief summary of the steps I took:-

1) Since I was behind a proxy I had to export environment variable http_proxy.

2) Downloaded yum-2.0.8-1.noarch.rpm from

3) Installed it using
rpm –i yum-2.0.8-1.noarch.rpm

4) Configured my yum.conf to look like this:


#ame=Red Hat Linux $releasever - $basearch - Base
name=CentOS-$releasever - Base

name=Red Hat Linux $releasever - Updates

5) Downloaded the gpg key for CentOS rpm packages from

6) Imported the key like this:
rpm --import RPM-GPG-KEY-CentOS-4

7) Run “yum –y update”. Now Sit back and enjoy seeing your system being updated.


lokesh said...

[root@home lokesh]# rpm -ivh
error: Failed dependencies:
yum < 2.6.2 conflicts with yum-metadata-parser-1.0-8.fc6.i386

what to do now??

Shahnawaz Saifi said...

updated version is already installed.