Installing YUM on CentOS 4 x86_64 (64-bit)

For 32-bit OS click here

On this page I've got everything to get working wget and install yum on a CentOS machine.

Usually CentOS comes with wget and yum, but if you choose to use a minimal installation (for example, on a VPS), then you may find out that there is no yum and no wget.

This page contains everything you need to set up wget and yum including all dependancy packages.

Let's install wget first

Log in into your server as root and type this:

rpm -Uvh http://www.eomy.net/linux/install-yum-x86_64/wget-1.10.2-0.40E.x86_64.rpm

Install yum from rpm packages

cd ~
mkdir yum-install
cd yum-install
wget http://www.eomy.net/linux/install-yum-x86_64/centos-yumconf-4-4.5.noarch.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/elfutils-0.97.1-5.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/elfutils-libelf-0.97.1-5.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/expat-1.95.7-4.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/gmp-4.1.4-3.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/libxml2-2.6.16-12.6.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/libxml2-python-2.6.16-12.6.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/python-2.3.4-14.7.el4.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/python-elementtree-1.2.6-5.el4.centos.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/python-sqlite-1.1.7-1.2.1.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/python-urlgrabber-2.9.8-2.noarch.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/readline-4.3-13.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/rpm-4.3.3-32_nonptl.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/rpm-python-4.3.3-32_nonptl.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/sqlite-3.3.6-2.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/yum-2.4.3-4.el4.centos.noarch.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/yum-metadata-parser-1.0-8.el4.centos.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/popt-1.9.1-32_nonptl.x86_64.rpm
wget http://www.eomy.net/linux/install-yum-x86_64/rpm-libs-4.3.3-32_nonptl.x86_64.rpm

rpm -Uvh *

The output will be something similar to this:

[root@server yum-install]# rpm -Uvh *
Preparing...                ########################################### [100%]
   1:elfutils-libelf        ########################################### [  5%]
   2:popt                   ########################################### [ 11%]
   3:readline               ########################################### [ 16%]
   4:sqlite                 ########################################### [ 21%]
   5:libxml2                ########################################### [ 26%]
   6:yum-metadata-parser    ########################################### [ 32%]
   7:python-sqlite          ########################################### [ 37%]
   8:elfutils               ########################################### [ 42%]
   9:gmp                    ########################################### [ 47%]
  10:python                 ########################################### [ 53%]
  11:libxml2-python         ########################################### [ 58%]
  12:python-urlgrabber      ########################################### [ 63%]
  13:expat                  ########################################### [ 68%]
  14:python-elementtree     ########################################### [ 74%]
  15:centos-yumconf         ########################################### [ 79%]
  16:rpm-libs               ########################################### [ 84%]
  17:rpm                    ########################################### [ 89%]
  18:rpm-python             ########################################### [ 95%]
  19:yum                    ########################################### [100%]
[root@server yum-install]#

Update repository info

Since February 2012, Centos 4 is no longer supported and was removed from official centos mirrirs. To be able to use yum, you will also need to switch to the vault repository:
cd /etc/yum.repos.d
mv CentOS-Base.repo "CentOS-Base.repo.bak-`date +%s`"
wget http://www.eomy.net/linux/CentOS4-Base-vault.repo
mv CentOS4-Base-vault.repo CentOS-Base.repo

yum clean all
yum makecache

Update installed packages

It will be a wise idea to update all packages installed in the system:
yum update

      Name                                                                   Last modified      Size  Description
Parent Directory - HEADER.html 30-Mar-2012 03:49 4.5K README.html 26-Aug-2007 11:20 53 centos-yumconf-4-4.5.noarch.rpm 09-Sep-2009 18:44 3.6K elfutils-0.97.1-5.x86_64.rpm 09-Sep-2009 18:44 145K elfutils-libelf-0.97.1-5.x86_64.rpm 09-Sep-2009 18:44 38K expat-1.95.7-4.x86_64.rpm 09-Sep-2009 18:44 72K gmp-4.1.4-3.x86_64.rpm 09-Sep-2009 18:44 180K libxml2-2.6.16-12.6.x86_64.rpm 09-Sep-2009 18:44 653K libxml2-python-2.6.16-12.6.x86_64.rpm 09-Sep-2009 18:45 470K popt-1.9.1-32_nonptl.x86_64.rpm 09-Sep-2009 18:54 65K python-2.3.4-14.7.el4.x86_64.rpm 09-Sep-2009 18:47 5.0M python-elementtree-1.2.6-5.el4.centos.x86_64.rpm 09-Sep-2009 18:47 91K python-sqlite-1.1.7-1.2.1.x86_64.rpm 09-Sep-2009 18:47 39K python-urlgrabber-2.9.8-2.noarch.rpm 09-Sep-2009 18:47 118K readline-4.3-13.x86_64.rpm 09-Sep-2009 18:47 188K rpm-4.3.3-32_nonptl.x86_64.rpm 09-Sep-2009 18:47 662K rpm-libs-4.3.3-32_nonptl.x86_64.rpm 22-Jul-2009 21:29 828K rpm-python-4.3.3-32_nonptl.x86_64.rpm 09-Sep-2009 18:47 92K sqlite-3.3.6-2.x86_64.rpm 09-Sep-2009 18:47 201K wget-1.10.2-0.40E.x86_64.rpm 09-Sep-2009 18:36 576K yum-2.4.3-4.el4.centos.noarch.rpm 09-Sep-2009 18:48 386K yum-metadata-parser-1.0-8.el4.centos.x86_64.rpm 09-Sep-2009 18:48 24K
Hosted by EOMY.NET