Howto: Install yum On RHEL 4
There are more than a couple of ways of updating Red Hat Enterprise Linux (RHEL) packages on your machine. One is by using up2date, the default package updater of RHEL systems. Unlike Fedora and CentOS which uses yum, up2date requires you to be registered to Red Hat Network (RHN) to be able to download or update your packages from the RHN repository.
Now, what if you need to install a certain package that is not available in your current repository by up2date? Or what if the package in the repository wreaks havoc in your system? Maybe you should try using yum to install or update rpm packages.
But… but… but how can I install yum in my RHEL machine?, you may ask. It’s actually very simple.
I got this tip from Babar Haq’s Blog with a little modification since I am using RHEL 4.
1. Download yum by using wget
# wget http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.8-1.noarch.rpm
2. Install the rpm
# rpm -ivh yum-2.0.8-1.noarch.rpm
3. Configure /etc/yum.conf to use compatible repository
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
[base]
name=CentOS-$releasever – Base
baseurl=http://mirror.centos.org/centos/4/os/i386/
gpgcheck=1
[updates]
name=Red Hat Linux $releasever – Updates
baseurl=http://mirror.centos.org/centos/4/updates/i386/
gpgcheck=1
4. Download and install the CentOS GPG Key
# wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
# rpm –import RPM-GPG-KEY-CentOS-4
5. Test yum to see if it works (I tested by running full update on my machine)
# yum update
*Note: This will update ALL installed packages in your machine. If you do not want to do this, cancel the process or skip this step.
If you reach step 5 without encountering any errors, it means that yum is successfully updating your machine with the latest versions available in the repo. ![]()
This worked perfectly fine for me. If you experienced any errors, post a message and I will try to help you out ![]()
Related Posts
37 Comments to “Howto: Install yum On RHEL 4”
Post comment
Search PinoyTux
Subscribe to Email Feeds
Blog Lounge
Popular Posts
Recent Posts
Drop your Card Here
Recent Comments
- mega-mind.net , , Dien Dan,Forums,Blog,CMS,php,cgi,asp,software,serial,hardware,game,games,choi game,Thuong mai dien tu, hoc tap, mua ban, download,choi nhac, xem phim, dien anh,cac van de khac,nokia,hp.vaio,iphone,ipad,itune,gmail,yahoo,chat,crack,an nic on President of United States of America: Barack Obama
- Belarus Hava Yolları, Belarus airlines, Uçak Bileti, Air tickets, Belarus uçak on Cebu Pacific Sucks
- Cezayir Hava Yolları, Cezayir airlines, Uçak Bileti, Air tickets, Cezayir uçak on Cebu Pacific Airlines is Evil!
- Lambchop on Cebu Pacific Airlines is Evil!
- rabat on Linux Comics of the Day









[...] has a guide on installing YUM on RHEL4. She got the idea from a blog entry about installing yum in [...]
If it worked in 2006, it doesn’t in 2008.
Options, paths to release repositories changed and the commands have to be modified.
I’m using rhel 4.2 on VmWare since I can’t get a lab machine from my admin to upgrade to rhel 5.0, which is required for evaluating new packages. I installed yum2.0.8 but it does not see the new package repo using yum list.
Thanks for the guide. I was having trouble finding a good updated guide to installing YUM on RHEL4. This worked perfectly for me the first time.
Good work.
Ryan’s last blog post is New Update To An Old Plugin
Thanks! I ran through your instructions and they worked perfectly on RHEL4.
Thanks so much, worked great first time no problems!
Worked perfect on RHEL4.7. thanks
This worked perfectly fine for me too.
Thanks for your Howto!
http://yum.baseurl.org/download/2.0/yum-2.0.8.tar.gz
I did wget http://yum.baseurl.org/download/2.0/yum-2.0.8.tar.gz instead. It seems the non archived files were removed, killing your link.
thanks for the trick.
its super. 
for bipper in #8, you can use the yum rpm and the dependencies in http://www.freevps.com/download/yum/RHEL4/
it works for me.
When importing the GPG file, you will need to use a regular dash for the
-installkeyword.rpm –import RPM-GPG-KEY-CentOS-4
Thank you for writing and posting this procedure.
After going through these steps and running yum update,
I get a message of no repositories available.
Do I need to set up a repository? And how do I do that?
The yum package can be found here (wget) http://gd.tuwien.ac.at/opsys/linux/yum/2.0/yum-2.0.8-1.noarch.rpm
x
hello there..
I’m anew linux user…
please teach me…
i really appreciate that…
khalifah´s last blog post is
Very helpful info. Thank you. I did, however, have to install 4 additional packages besides yum. Here they are in the order that I installed them:
python-elementtree-1.2.6-5.el4.centos.i386.rpm
python-urlgrabber-2.9.8-2.noarch.rpm
sqlite-3.3.6-2.i386.rpm
python-sqlite-1.1.7-1.2.1.i386.rpm
yum-2.4.3-4.el4.centos.noarch.rpm
Thanks again.
5. Test yum to see if it works (I tested by running full update on my machine)
#cat /etc/redhat-release
Enterprise Linux Enterprise Linux AS release 4 (October Update 7)
#yum update
Repository base is listed more than once in the configuration
Setting up Update Process
Setting up repositories
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update
Thanks, it worked flawlessly
I would like to point out that I had to use this package yum-2.0.8-1.noarch.rpm As it does not ask for dependencies newer versions of yum.
http://gd.tuwien.ac.at/opsys/linux/yum/2.0/yum-2.0.8-1.noarch.rpm
I have uploaded it to rapidshare.com for backup link
http://rapidshare.com/files/281407522/yum-2.0.8-1.noarch.rpm.html
MD5: F14FC23B7CC27455A9CFD92650054539
Thank you so very much.
Thanks dude it works fine
Works!
………but “# yum update” is dangerous coz it even changed my distro from RedHat to CentOs (i.e. CentOS login ,CentOs Desktop..). I have some software that only runs on redhat wouldnt run on the CentOS
Hi Rai
I tried everything as mentioned by you to install YUM .I got no error messages upto step No5 but after that on giving command
# yum update
got the following message…please help what to do next
100%[====================================>] 1,795 –.–K/s
14:24:22 (1.40 MB/s) – `RPM-GPG-KEY-CentOS-4′ saved [1,795/1,795]
[root@115 ~]# rpm -import RPM-GPG-KEY-CentOS-4
[root@115 ~]# yum update
Gathering header information file(s) from server(s)
Server: Red Hat Linux 4ES – i386 – Base
retrygrab() failed for:
http://mirror.dulug.duke.edu/pub/yum-repository/redhat/4ES/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/4ES/i386/headers/header.info
[Errno 4] IOError:
Hi Rai
I tried everything as mentioned by you to install YUM .I got no error messages upto step No5 but after that on giving command
# yum update
got the following message…please help what to do next
100%[====================================>] 1,795 –.–K/s
14:24:22 (1.40 MB/s) – `RPM-GPG-KEY-CentOS-4′ saved [1,795/1,795]
[root@115 ~]# rpm -import RPM-GPG-KEY-CentOS-4
[root@115 ~]# yum update
Gathering header information file(s) from server(s)
Server: Red Hat Linux 4ES – i386 – Base
retrygrab() failed for:
http://mirror.dulug.duke.edu/pub/yum-repository/redhat/4ES/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/4ES/i386/headers/header.info
[Errno 4] IOError:
Waaa ngsearch ako dito ako napunta.
yun tapos ko na magamit dun ko lng nalaman yung url 
@Simmi
Try another mirror. The one you are using is no longer working.
Still works great. Thanks so much for the how to!
Ditto! Thankyou so much. Converted a RHEL4 UP2DATE to YUM and using your HOWTO with DAG’s RPM repository worked like a dream. Thanks!
David
Thanks a lot! It works well!
YUM run well on RHEL4.
[...] To configure the YUM repository for RHEL3 and RHEL4 http://www.pinoytux.com/linux/howto-…-yum-on-rhel-4 If you have problem with proxy server for resolving with Domain controller use the following [...]
Thank you so much!!!.
Just Before install yum, you can download the “previous” rpm from here: http://dag.wieers.com/rpm/packages.php and if your RedHat is 64 bits, edit the lines in step 3 (delete i386 and write x86_64)
Regards!
I wonder though. . .does this interfere with up2date at all, or do they work in unison??
[...] hope thi link helps you more http://www.pinoytux.com/linux/howto-…-yum-on-rhel-4 you can also try [...]
Thank you! You helped me install Mplayer on a RHEL 4 Server!
So, all of this went very well until I tried a mass update.. Updating a few RPMs works fine, however I have a server with 6 repos (various deployments) and continue to get this error…
–> Running transaction check
–> Processing Dependency: gstreamer-tools for package: gstreamer-plugins
–> Processing Dependency: openldap = 2.2.13-12.el4_8.3 for package: compat-openldap
–> Processing Dependency: openldap = 2.2.13-6.4E for package: compat-openldap
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in ?
yummain.main(sys.argv[1:])
File “/usr/share/yum-cli/yummain.py”, line 138, in main
(result, resultmsgs) = base.buildTransaction()
File “__init__.py”, line 401, in buildTransaction
File “depsolve.py”, line 226, in resolveDeps
File “depsolve.py”, line 357, in _processReq
File “depsolve.py”, line 418, in _requiringFromInstalled
File “__init__.py”, line 1479, in getInstalledPackageObject
IndexError: list index out of range
Is there some kernel tuning that needs doing or some parameter I need to set for python?
Really an astonishing article, however my mind is a bit different. All in all, the more readers, the more different opinion and I respect yours. And I’m still going to check your other entries, too!
Charlie,
Thanks for the kind words. I hope you all have been doing well
across the pond. Not sure about making it over for the Great Race…I’ll have
to see if Dale has anything planned. You guys have told us all about it,
though, and it sounds like one heck of a time.
I’ll be sure to stay in touch
karen millen dresses
Awesome – all works! downloading updates to all my RPMs thanks to you
The choice of your leather dress sac longchamp pliage would depend on the kind of look you want. For example if you want to look incredibly sassy and chic, t sac longchamp hen go ahead and find a leather dress in which you can stay comfortable and utmost confident. Similarly, there can be nothing compared to a short leather dress. It is excellent to boost your confidence and give you a modern look. A short leather dress is something that you can wear to make a statement and prove that you are fierce, sexy women. Pairing a short leather dress with sexy pumps will add a touch of completeness in your looks. You can also wear some vibrant shoes to look even better.