Install yum on RHEL4

Submitted by eth00 on

So why do you want to install yum on a rhel box if you already have up2date for RHEL4? Well there are a number of reasons, the main one and the reason I wrote this is that I was installing openvz and it needed yum installed. Trying to just use the yum rpm or source compiling was getting all sorts of python errors. I decided to just grab the centos 4 rpms. Note this is not going to be used for updating, up2date still is used for that.


*NOTE* There was some confusion below, this guide is only to be used on a RHEL4 server - it will break RHEL3.





Just copy/paste the commands


mkdir /usr/local/src/yum
cd /usr/local/src/yum



wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/python-urlgrabber-2.9...
wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/python-sqlite-1.1.6-1...
wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/python-elementtree-1....
wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/python-urlgrabber-2.9...
wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/centos-yumconf-4-4.3....
wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/yum-2.4.0-1.centos4.n....
wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/sqlite-3.2.2-1.i386.rpm



rpm -Uvh *rpm

Articles and guides: 

Comments

update the "Install yum on RHEL4" webpage

On the centos ftpserver, the file 'centos-yumconf-4-4.3.noarch.rpm' is now,

centos-yumconf-4-4.5.noarch.rpm

The file 'yum-2.4.0-1.centos4.noarch.rpm' is now

yum-2.4.2-2.centos4.noarch.rpm

It seems like the centos server thus changes over time, users should be warned about this, perhaps a comment about that could be added to the RHEL4 yum install instructions on your blog.

Cheers,
Blair (aka Geonmaster).

Incorrect procedure to update RHEL 3 to CentOS

Hy,

I've been reading this howto and I'm sad to say that this procedure is NOT safe and can break dependencies.

The best way to upgrade your box to CentOS 4 (if you have RHEL3) is by using first the files from CentOS 3.7 (the latest CentOS 3 release) and install only:

> centos-release
> centos-yumconf
> yum
> import the key for version 3

After making this installation you will be able to update your box without having to go and get some new packages (like the python ones) that can result on breaking a lot of deps if forced and a non working upgrade if not forced.

After installing this packages just update all the server with "yum update". After all packages are updated just go to the CentOS mirror and download the centos-release and the key for CentOS 4 and rerun the yum update.

You'll see that it takes a little more but its safer and no need to go and mess with python or other packages... just the basic ones.

Best regards
Miguel Simões

yum

Yes this guide is meant for RHEL4 to get centos4 yum support. It is NOT MEANT to be run on a RHEL3 box. The title indicated RHEL4 but I will update the article to make that point clear as well. I have tested it and it works fine on RHEL4.

All went successful, but issue of kernel

Hi,

When I tried to run yum upgrade for Centos 3 to Centos 4. I am getting this error:

.conflict between udev and kernel

It means first I have to upgrade kernel manually to 2.6.x. But can you tell me how can I do that........
Waiting for your response..

Thankyou,

Regards,

-K-A-S-H-I-F-

An error after installing yum

After following the exact typing shown above and (and replacing to the newer version of yum and centos-yumconfig) I sadly get the following error:

:> yum

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

/usr/lib/python2.3/site-packages/cElementTree.so: cannot open shared object file: No such file or directory

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.3.4 (#1, Feb 6 2006, 10:38:45)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)]
-----------------------------------

Did I install a too old version of yum (that requires an older version of python), or what is the probelm? also, is there absolutely no problem of installing the i386 versions of all these programs when I'm using a 64 bits machine?

I'd really appriciate any help,

Add new comment