Operation Systems

Installing yum on CentOS

The minimum installation of CentOS comes without Yum. In case to use it we will have to install it first 🙂

This task is not so simple, because of the package dependencies. In this article I will briefly explain how we can do this in a minute. For Fedora Core you can change the repositority so you can install the same packages from Fedora  repository and it should work as well.

 

The first think to do is to check whether it is a 32 bits or a 64 bits CentOS.

This is a 32 bits CentOS example.
[root@vps375 ~]# uname -m
i686

This is a 64 bits CentOS example.
[root@aleswo8560 ~]# uname -m
x86_64

If it is a 32 bits CentOS, execute this command:

 


for file in \
gmp-4.1.4-10.el5.i386.rpm \
readline-5.1-1.1.i386.rpm \
python-2.4.3-24.el5.i386.rpm \
libxml2-2.6.26-2.1.2.7.i386.rpm \
libxml2-python-2.6.26-2.1.2.7.i386.rpm \
expat-1.95.8-8.2.1.i386.rpm \
python-elementtree-1.2.6-5.i386.rpm \
sqlite-3.3.6-2.i386.rpm \
python-sqlite-1.1.7-1.2.1.i386.rpm \
elfutils-0.137-3.el5.i386.rpm \
rpm-python-4.4.2.3-9.el5.i386.rpm \
m2crypto-0.16-6.el5.3.i386.rpm \
python-urlgrabber-3.1.0-5.el5.noarch.rpm \
yum-metadata-parser-1.1.2-2.el5.i386.rpm \
yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm \
python-iniparse-0.2.3-4.el5.noarch.rpm \
yum-3.2.19-18.el5.centos.noarch.rpm
do rpm -Uvh –nodeps http://mirror.centos.org/centos-5/5.3/os/i386/CentOS/$file;
done


If it is a 64 bits CentOS, execute this command:

 


for file in \
gmp-4.1.4-10.el5.x86_64.rpm \
readline-5.1-1.1.x86_64.rpm \
python-2.4.3-24.el5.x86_64.rpm \
libxml2-2.6.26-2.1.2.7.x86_64.rpm \
libxml2-python-2.6.26-2.1.2.7.x86_64.rpm \
expat-1.95.8-8.2.1.x86_64.rpm \
python-elementtree-1.2.6-5.x86_64.rpm \
sqlite-3.3.6-2.x86_64.rpm \
python-sqlite-1.1.7-1.2.1.x86_64.rpm \
elfutils-0.137-3.el5.x86_64.rpm \
rpm-python-4.4.2.3-9.el5.x86_64.rpm \
m2crypto-0.16-6.el5.3.x86_64.rpm \
python-urlgrabber-3.1.0-5.el5.noarch.rpm \
yum-metadata-parser-1.1.2-2.el5.x86_64.rpm \
yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm \
python-iniparse-0.2.3-4.el5.noarch.rpm \
yum-3.2.19-18.el5.centos.noarch.rpm
do rpm -Uvh –nodeps http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/$file;
done


 

Finally, you may test whether yum is working fine, it is up to you!

For instance I am using “yum list installed” as a test command.

That’s all. Cheers!

Leave a Reply