PDA

View Full Version : Install Yum on CentOS 5 VPS



Max
June 30th, 2009, 05:49 PM
To install yum on our CentOS 5 VPS you need the following dependencies.
(this will work as long as the mirror is still live)
Create the following shell script to download all the required files: (ex: vi yum.sh)
Insert the following text: (hit the "i" key)


#!/bin/bash

for file in \
elfutils-0.125-3.el5.i386.rpm \
elfutils-libs-0.125-3.el5.i386.rpm \
expat-1.95.8-8.2.1.i386.rpm \
gmp-4.1.4-10.el5.i386.rpm \
libxml2-2.6.26-2.1.2.1.i386.rpm \
libxml2-python-2.6.26-2.1.2.1.i386.rpm \
m2crypto-0.16-6.el5.2.i386.rpm \
python-2.4.3-21.el5.i386.rpm \
python-elementtree-1.2.6-5.i386.rpm \
python-iniparse-0.2.3-4.el5.noarch.rpm \
python-sqlite-1.1.7-1.2.1.i386.rpm \
python-urlgrabber-3.1.0-2.noarch.rpm \
readline-5.1-1.1.i386.rpm \
rpm-4.4.2-48.el5.i386.rpm \
rpm-libs-4.4.2-48.el5.i386.rpm \
rpm-python-4.4.2-48.el5.i386.rpm \
sqlite-3.3.6-2.i386.rpm \
yum-3.2.8-9.el5.centos.1.noarch.rpm \
yum-metadata-parser-1.1.2-2.el5.i386.rpm
do wget http://mirror.centos.org/centos-5/5.2/os/i386/CentOS/$file;
done

exit vim (ESC, ":wq")
Make script executable (chmod 700 yum.sh)
Run script (./yum.sh)
Install each by the following command: rpm -Uvh rpm_name.rpm
(replace rpm_name.rpm with the actual name of the rpm)

Some might be required to be installed first, if so you will see a "failed dependencies" error message. Install the failed dependencies first in that case.