18 JunInstall yum in CentOS 5.6
Saturday, 18 June 2011 — 19:53I had the bad surprise of finding my centOS distribution at hostingrails.com (it comes with cpanel and that is the reason), without yum package pre-installed.
You need to have rpm and wget already installed. Create a temporary directory, paste the following code in a file in that directory, make it executable and run it:
mkdir temp && cd temp vim yumdownload
Copy this content there:
#!/bin/bash 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.3.el5_5.3.x86_64.rpm \ gmp-4.1.4-10.el5.x86_64.rpm \ libxml2-2.6.26-2.1.2.8.el5_5.1.x86_64.rpm \ libxml2-python-2.6.26-2.1.2.8.el5_5.1.x86_64.rpm \ m2crypto-0.16-6.el5.8.x86_64.rpm \ python-libs-2.4.3-43.el5.x86_64.rpm \ python-2.4.3-43.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-6.el5.noarch.rpm \ readline-5.1-3.el5.x86_64.rpm \ rpm-4.4.2.3-22.el5.x86_64.rpm \ rpm-libs-4.4.2.3-22.el5.x86_64.rpm \ rpm-python-4.4.2.3-22.el5.x86_64.rpm \ sqlite-3.3.6-5.x86_64.rpm \ yum-3.2.22-33.el5.centos.noarch.rpm \ yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm \ yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm do wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/$file; done
Make it runnable:
chmod a+x yumdownload ./yumdownload
You will notice some didn’t work. So let’s do it manually:
rpm -Uvh python-elementtree-1.2.6-5.x86_64.rpm rpm -Uvh python-iniparse-0.2.3-4.el5.noarch.rpm rpm -Uvh python-sqlite-1.1.7-1.2.1.x86_64.rpm rpm -Uvh rpm-python-4.4.2.3-22.el5.x86_64.rpm rpm -Uvh m2crypto-0.16-6.el5.8.x86_64.rpm rpm -Uvh python-urlgrabber-3.1.0-6.el5.noarch.rpm rpm -Uvh yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm rpm -Uvh --nodeps yum-fastestmirror* rpm -Uvh yum-3.2.22-33.el5.centos.noarch.rpm
And you are done!!.
Ger
10 Aug 02:53
exact downloadable rpm list below;;
--#!/bin/bash
for file in \
elfutils-0.137-3.el5.i386.rpm \
elfutils-libs-0.137-3.el5.i386.rpm \
elfutils-libelf-0.137-3.el5.i386.rpm \
expat-1.95.8-8.3.el5_5.3.i386.rpm \
gmp-4.1.4-10.el5.i386.rpm \
libxml2-2.6.26-2.1.2.8.el5_5.1.i386.rpm \
libxml2-python-2.6.26-2.1.2.8.el5_5.1.i386.rpm \
m2crypto-0.16-6.el5.8.i386.rpm \
python-2.4.3-43.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-6.el5.noarch.rpm \
readline-5.1-3.el5.i386.rpm \
rpm-4.4.2.3-22.el5.i386.rpm \
rpm-libs-4.4.2.3-22.el5.i386.rpm \
rpm-python-4.4.2.3-22.el5.i386.rpm \
sqlite-3.3.6-5.i386.rpm \
Cluster_Administration-ko-KR-5.2-1.el5.centos.noarch.rpm \
yum-3.2.22-33.el5.centos.noarch.rpm \
yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm \
yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm \
do wget http://mirror.centos.org/centos/5/os/i386/CentOS/$file;
done
--thanks for your helpful post :)