Menu

17 September 2008

How to Install Yum on Redhat RHEL4

Install yum

Apply these commands in terminal



cd
mkdir yumsoft
cd yumsoft
wget ftp://fr.rpmfind.net/linux/dag/redhat/el4/en/x86_64/dag/RPMS/python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
wget ftp://ftp.icm.edu.pl/vol/rzm1/linux-dag/redhat/el4/en/i386/RPMS.dag/python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
wget ftp://fr.rpmfind.net/linux/dag/redhat/el4/en/x86_64/dag/RPMS/yum-2.4.2-0.4.el4.rf.noarch.rpm
wget http://dag.wieers.com/rpm/packages/sqlite/sqlite-2.8.17-1.el4.rf.i386.rpm
wget ftp://ftp.icm.edu.pl/vol/rzm1/linux-dag/dries/redhat/el4/en/i386/RPMS.dries/python-elementtree-1.2.6-7.el4.rf.i386.rpm
wget ftp://ftp.isu.edu.tw/pub/Linux/CentOS/4.6/updates/s390/RPMS/centos-yumconf-4-4.5.noarch.rpm
su
rpm -Uvh *.rpm
rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms
rpm --import ftp://ftp.pbone.net/mirror/ftp.centos.org/RPM-GPG-KEY-centos4
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt



Make /etc/yum.conf

open /etc/yum.conf delete if any content present. copy paste these lines.

[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
timeout=120
retries=20
obsoletes=1
gpgcheck=1

[redhat-base]
name = redhat base
baseurl = http://mirror.dulug.duke.edu/pub/yum-repository/redhat/9/i386/
enabled = 0

[adobe-linux-i386]
name=Adobe Systems Incorporated
baseurl=http://linuxdownload.adobe.com/linux/i386/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

[atrpm-stable]
name=atrpm -stable
baseurl=http://dl.atrpms.net/el4-i386/atrpms/stable/
enable=1


[atrpm-bleeding]
name=atrpm -bleeding
baseurl=http://dl.atrpms.net/el4-i386/atrpms/bleeding/
enable=0

[atrpm-testing]
name=atrpm -testing
baseurl=http://dl.atrpms.net/el4-i386/atrpms/testing/
enable=0


[redhat-update]
name = redhat updates
baseurl = http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/9/
enabled = 0


[centos-addons]
name = centos addons
baseurl = http://mirror.dulug.duke.edu/pub/centos/4.6/addons/i386/
enabled = 1

[centos-base]
name = centos plus
baseurl = http://mirror.dulug.duke.edu/pub/centos/4.6/centosplus/i386/
enabled = 1

[centos-contrib]
name = centos contrib
baseurl = http://mirror.dulug.duke.edu/pub/centos/4.6/contrib/i386/
enabled = 1


[centos-csgfs]
name = centos csgfs
baseurl = http://mirror.dulug.duke.edu/pub/centos/4.6/csgfs/i386/
enabled = 1


[centos-update]
name = centos update
baseurl = http://mirror.dulug.duke.edu/pub/centos/4.6/updates/i386/
enabled = 1


[centos-extra]
name = centos extra
baseurl = http://mirror.dulug.duke.edu/pub/centos/4.6/extras/i386/
enabled = 1


[centos-fasttrack]
name = centos fasttrack
baseurl = http://mirror.dulug.duke.edu/pub/centos/4.6/fasttrack/i386/
enabled = 1


[centos-testing]
name = centos testing
baseurl = http://dev.centos.org/centos/4/testing/i386/
enabled = 0


[rpmforge]
name = Red Hat Enterprise rpmforge
baseurl = http://apt.sw.be/redhat/el4/en/i386/rpmforge/
enabled = 1

[dries]
name = dries
baseurl = http://apt.sw.be/redhat/el4/en/i386/dries/
enabled = 1

[dag]
name = dag
baseurl = http://apt.sw.be/redhat/el4/en/i386/dag/
enabled = 1

[google]
name=Google - i386
baseurl=http://dl.google.com/linux/rpm/stable/i386
enabled=1
gpgcheck=1



# Be sure to enable the distro specific repository for your distro below:
# - jpackage-fc for Fedora Core
# - jpackage-rhel for Red Hat Enterprise Linux and derivatives

[jpackage-generic]
name=JPackage (free), generic
mirrorlist=http://www.jpackage.org/jpackage_generic.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1


[jpackage-rhel]
name=JPackage (free) for Red Hat Enterprise Linux $releasever
mirrorlist=http://www.jpackage.org/jpackage_rhel-4.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1

[jpackage-generic-nonfree]
name=JPackage (non-free), generic
mirrorlist=http://www.jpackage.org/jpackage_generic_nonfree.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1


Initial setup

apply these commands

  • su
  • cd /etc/yum.repos.d/
  • Remove all the files from this directory
  • yum list available

Take a Coffee , It will take 5 - 10 minute. Also If you got any error then please try enabling or disabling the repo configuration inside /etc/yum.conf file

  • If above command goes sucess then you will this kind of list
........
zoo.i386 2.10-2.2.el4.rf dries
zope.i386 2.8.7-1.el4.rf rpmforge
zsplit.i386 1.2.0-1.2.el4.rf dries
zssh.i386 1.5-0.c.2.el4.rf dries
zsync.i386 0.5-1.el4.rf dries
zvbi.i386 0.2.31-1.el4.rf rpmforge
zvbi-devel.i386 0.2.31-1.el4.rf rpmforge
zziplib.i386 0.13.45-1.2.el4.rf rpmforge
zziplib-devel.i386 0.13.45-1.2.el4.rf rpmforge
  • Next is to update yum software, apply (as super users)
  • yum update yum
  • Next is to update your whole system , this is optional, it will take a long time like 40-60 minutes, you can skip this
  • yum update

Installing any software

You can install software like

  • yum install mplayer
  • yum install vlc

like this you can install any software

Post a Comment