Install YUM on linux/Unix/Red Hat/CentOS/Fedora Core

The following guideline should work for Red Hat (4, other edition), CentOS, Fedora Core etc.

Download


1. wget http://dag.wieers.com/rpm/packages/yum/yum-2.4.2-0.4.el4.rf.noarch.rpm

or

1. wget http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.8-1.noarch.rpm

2. wget ftp://195.220.108.108/linux/dag/redhat/el4/en/i386/dag/RPMS/sqlite-2.8.16-1.2.el4.rf.i386.rpm

3. wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/python-elementtree-1.2.6-7.el4.rf.i386.rpm

4. wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/python-sqlite-0.5.0-1.2.el4.rf.i386.rpm

5. wget ftp://rpmfind.net/linux/dag/redhat/el4/en/x86_64/dag/RPMS/python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm

Repository:
6. $wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm


Install

$rpm -ivh sqlite-2.8.16-1.2.el4.rf.i386.rpm
$rpm -ivh python-elementtree-1.2.6-7.el4.rf.i386.rpm
$rpm -ivh python-sqlite-0.5.0-1.2.el4.rf.i386.rpm
$rpm -ivh python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm

$rpm -ivh yum-2.4.2-0.4.el4.rf.noarch.rpm
or
$rpm -ivh yum-2.0.8-1.noarch.rpm

repository:
$rpm -ivh rpmforge-release-0.3.6-1.el4.rf.i386.rpm

Configure Yum

1. Configure /etc/yum.conf to use compatible repository [this is for red hat 4]
-------------------------------------------------------------------------------
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1

[base]
name=CentOS-$releasever – Base
baseurl=http://mirror.centos.org/centos/4/os/i386/
gpgcheck=1

[updates]
name=Red Hat Linux $releasever – Updates
baseurl=http://mirror.centos.org/centos/4/updates/i386/
gpgcheck=1

---------------------------------------------------------------------------------

2. Download and install the CentOS GPG Key

# wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4

# rpm -–import RPM-GPG-KEY-CentOS-4

If you are not using proxy to connect to WEB then ignore the next section
Configure Yum to use Proxy Server



3. check your yum is running successfully or not
# yum update


Configure Yum to use Proxy Server

1. Take backup of wgetrc file under etc dir

su -
cd /etc
cp wgetrc wgetrc.backup

2. Comment out the following line from the file (/etc/wgetrc) and insert your proxy server IP and port number. In my case proxy server ip is 10.10.10.1 and port is 80. Don't forget to insert http before the proxy server IP.

--------------------------------------------------------------------
# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
http_proxy = http://10.10.10.1:80/
ftp_proxy = http://10.10.10.1:80/
https_proxy = http://10.10.10.1:80/

# If you do not want to use proxy at all, set this to off.
use_proxy = on
---------------------------------------------------------------------


3. Also edit the file .bash_profile in your home directory

# vi ~/.bash_profile

http_proxy=http://10.10.10.1:80
export http_proxy

4. Source your bash profile to the current shell , otherwise close the present shell and open a new shell

# cd ~
# . .bash_profile

if you have done the above steps correctly then "yum update" should work now.

Comments

Post a Comment

Popular Posts