Install yum from internet on Centos 5.4

If you have ever been in the situation where you had to install packages on several CentoS 5.4 machines without having yum pre-installed and not having a local rpm source available you know it is a lot of work to download all dependency packages by hand. I created a simple bash-script to download the necessary packages to install yum by hand. Create a new file for example with the content:
# Install yum from the net
for file in \
elfutils-0.137-3.el5.x86_64.rpm \
elfutils-libs-0.137-3.el5.x86_64.rpm \
elfutils-libelf-0.137-3.el5.x86_64.rpm \
expat-1.95.8-8.2.1.x86_64.rpm \
gmp-4.1.4-10.el5.x86_64.rpm \
libxml2-2.6.26- \
libxml2-python-2.6.26- \
m2crypto-0.16-6.el5.6.x86_64.rpm \
popt- \
python-2.4.3-27.el5.x86_64.rpm \
python-elementtree-1.2.6-5.x86_64.rpm \
python-iniparse-0.2.3-4.el5.noarch.rpm \
python-sqlite-1.1.7-1.2.1.x86_64.rpm \
python-urlgrabber-3.1.0-5.el5.noarch.rpm \
readline-5.1-3.el5.x86_64.rpm \
rpm- \
rpm-libs- \
rpm-python- \
sqlite-3.3.6-5.x86_64.rpm \
yum-3.2.22-20.el5.centos.noarch.rpm \
yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm \
do wget$file; done
rpm -Uvh *rpm
and make it executable chmod 755 and run it.

Please login first before adding a comment.


You are here: Home Howtos and FAQs Bash Install yum from internet on Centos 5.4