Installing Yum On RHEL 3
I had a RHEL 3 WS at my work place. 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 WS 3 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 3 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 3, 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
http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.8-1.noarch.rpm
3) Installed it using
rpm –i yum-2.0.8-1.noarch.rpm
4) Configured my yum.conf to look like this:
5) Downloaded the gpg key for CentOS rpm packages from
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-3
6) Imported the key like this:
rpm --import RPM-GPG-KEY-CentOS-3
7) Run “yum –y update”. Now Sit back and enjoy seeing your system being updated.
Enjoy!
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 3 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 3, 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
http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.8-1.noarch.rpm
3) Installed it using
rpm –i yum-2.0.8-1.noarch.rpm
4) Configured my yum.conf to look like this:
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
#base]
#ame=Red Hat Linux $releasever - $basearch - Base
#aseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/3/os/i386/
gpgcheck=1
[updates]
name=Red Hat Linux $releasever - Updates
baseurl=http://mirror.centos.org/centos/3/updates/i386/
gpgcheck=1
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
#base]
#ame=Red Hat Linux $releasever - $basearch - Base
#aseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/3/os/i386/
gpgcheck=1
[updates]
name=Red Hat Linux $releasever - Updates
baseurl=http://mirror.centos.org/centos/3/updates/i386/
gpgcheck=1
5) Downloaded the gpg key for CentOS rpm packages from
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-3
6) Imported the key like this:
rpm --import RPM-GPG-KEY-CentOS-3
7) Run “yum –y update”. Now Sit back and enjoy seeing your system being updated.
Enjoy!

20 Comments:
Thanks for this great article.. its saved me alot of time..
Absolutely fantastic article! Got my yum working instantly with these instructions! Keep up the good work!
This works nicely, but it doesn't really give you an up-to-date system. "make" is still a buggy version and requires a newer version of glibc to update it.
thank you, your my hero
Didnt work:
[jyl@fjsoftllc yum]# yum -y update
Gathering header information file(s) from server(s)
Server: Red Hat Linux 3ES - i386 - Base
retrygrab() failed for:
http://mirror.dulug.duke.edu/pub/yum-repository/redhat/3ES/i386/headers/header.info
Executing failover method
failover: out of servers to try
Error getting file http://mirror.dulug.duke.edu/pub/yum-repository/redhat/3ES/i386/headers/header.info
[Errno 4] IOError: HTTP Error 404: Not Found
Is there a fail-over server?
Thanks man, you saved me a lot of time.
Thanks so much. I thought I am stuck with this old RHEL3
Works like a Charm , Great Work Man.
This worked for me. Thanks
[...]I got this tip from Babar Haq’s Blog with a little[...]
Thanks a lot. Getting updates for RHEL3 was a show stopper before. Thanks very much for the tip.
Nice one!
Thanks very much - this helped me out a lot!
This article is the gift that keeps on giving.
This is great and the set up worked flawlessly. One question - what does 'yum -y update' actually do? I am watching the updates go by and /var filling up and wonder if all these are actually updates of current libraries/applications. I say that partially because I tried 'yum search "enter package here"' and it seemed to do the same as 'yum -y update'. I would like to selectively search and install packages.
Thanks. Very useful.
Do you know if these updates are identical to those from rhn?
Step #2 & #3 need adjustments:
prompt> wget http://yum.baseurl.org/
download/2.0/yum-2.0.tar.gz
prompt> gunzip yum-2.0.tar.gz
prompt> tar xvf yum-2.0.tar
prompt> cd yum-2.0
prompt> ./configure
prompt> make
prompt> make install
continue w/ step 4.
Thank you so much :D
Wicked article on converting from using RHN to YUM. Saved me a lot of time and effort and money re-registering our server with RH.
Thanks
COlin
Nice work - thanks. This info is surprisingly hard to find so I was happy to find it. The first phase has gone very well and although I have not yet dared to execute the last part all indications are that it will go well.
Blogs are so informative where we get lots of information on any topic. Nice job keep it up!!
Dissertation
Thank you,
the previous admin mucked the yum to overcustomized it ... now I able to recovere the OS back to the official RHEL3.
Post a Comment
Subscribe to Post Comments [Atom]
<< Home