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!


25 Comments:
Thanks for this great article.. its saved me alot of time..
By
 Anonymous, At 
     9:26 AM 
	   
Absolutely fantastic article! Got my yum working instantly with these instructions! Keep up the good work!
By
 Anonymous, At 
     5:38 PM 
	   
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.
By
 Anonymous, At 
     11:48 PM 
	   
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?
By
 FJSOFT, At 
     2:45 AM 
	   
Thanks man, you saved me a lot of time.
By
 Anonymous, At 
     2:51 AM 
	   
Thanks so much. I thought I am stuck with this old RHEL3
By
 Unknown, At 
     10:36 PM 
	   
Works like a Charm , Great Work Man.
By
 Anonymous, At 
     8:57 PM 
	   
This worked for me. Thanks
By
 ajit, At 
     1:22 PM 
	   
[...]I got this tip from Babar Haq’s Blog with a little[...]
By
 Anonymous, At 
     9:29 PM 
	   
Thanks a lot. Getting updates for RHEL3 was a show stopper before. Thanks very much for the tip.
By
 typedef uchar_t pluto;, At 
     12:45 PM 
	   
Nice one!
Thanks very much - this helped me out a lot!
By
 Anonymous, At 
     2:52 PM 
	   
This article is the gift that keeps on giving.
By
 leBolide, At 
     2:06 AM 
	   
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.
By
 Crispy, At 
     12:27 PM 
	   
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.
By
 AEC, At 
     3:49 AM 
	   
Thank you so much :D
By
 Anonymous, At 
     4:07 PM 
	   
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
By
 Colin Corrigan, At 
     9:14 AM 
	   
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.
By
 Anonymous, At 
     1:32 AM 
	   
Thank you,
the previous admin mucked the yum to overcustomized it ... now I able to recovere the OS back to the official RHEL3.
By
 V, At 
     10:03 PM 
	   
I cannot find a place to download yum. It appears that all links are obsolete. May someone provide any working links? Thanks, Sam Feb 24, 2010
By
 Sam, At 
     4:34 AM 
	   
Thanks, saved me lots of time. My Yum was broken and I needed php-mcrypt for a script I'm makin' ;)
By
 D, At 
     5:20 PM 
	   
ON RHEL 3 :
Download yum-2.0.8-1 from
http://dag.wieers.com/rpm/packages/yum/yum-2.0.8-0.1.el3.rf.noarch.rpm
Dated : May 16, 2010
By
 Rai KD, At 
     4:50 AM 
	   
The link is broken for your download of Yum. I posted and updated how to at http://crackednoodle.com/2010/07/update-older-rhel-with-yum/
Check it out
By
 Brad Kelley, At 
     5:15 PM 
	   
hi, good site very much appreciatted
By
 Anonymous, At 
     8:33 PM 
	   
learned a lot
By
 Anonymous, At 
     12:45 PM 
	   
Thanks a LOT for these steps, it helped me to do what 1000 searches on the internet didn't.
By
 KK, At 
     10:21 AM 
	   
Post a Comment
Subscribe to Post Comments [Atom]
<< Home