How to install YUM on centOS

What is Yum?
" Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.

Features include:

  • Multiple Repositories
  • Simple config file
  • Correct dependency calculation
  • Fast operation
  • rpm-consistent behavior
  • comps.xml group support, including multiple repository groups
  • Simple interface"
( Font )

How to install Yum on centOS server:

Login to your server as root and create yum directory
# cd /usr/local/src/
# mkdir youm
# cd yum

Now download some rpms that yum needs:
# wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/python-urlgrabber-2.9.6-2.noarch.rpm
# wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/python-sqlite-1.1.6-1.i386.rpm
# wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/python-elementtree-1.2.6-4.i386.rpm
# wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/python-urlgrabber-2.9.6-2.noarch.rpm
# wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/sqlite-3.2.2-1.i386.rpm
# rpm -Uvh *rpm

Download and install yum:
# wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/centos-yumconf-4-4.3.noarch.rpm
# wget http://centos.cs.ucr.edu/centos/4/apt/i386/RPMS.os/yum-2.4.0-1.centos4.noarch.rpm
# rpm -Uvh *rpm

4 Comments:

Asen said...

Please update your links.

Dr Mike said...

Yup, the links are out of date. Get a connection refused error when I try to run though this. Granted they're probably out of date on the other end as well.

Mitchell said...

This fixed me, but you have to get the links yourself.

I used this mirror
http://centos.info-e.com.mx/4.8/os/i386/CentOS/RPMS/


You can get a mirror list from here:
http://www.centos.org/modules/tinycontent/index.php?id=30

Anonymous said...

This solution worked with a few gotchas...

Know you version:
#cat /etc/redhat-release


Then get your mirror list:
http://www.centos.org/modules/tinycontent/index.php?id=30


Then build your download, I used:
http://centos.info-e.com.mx/4.8/os/i386/CentOS/RPMS/