redhat 下安装yum

 

1. 下载 wget http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm

2. 编译 rpmbuild --rebuild yum-2.0.8-1.src.rpm

3. cd /usr/src/redhat/RPMS/noarch/

4. rpm -ivh yum-2.0.8-1.noarch.rpm 

 

 

 vi /etc/yum.conf

删除原文件内容,添加以下内容:

 

 

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1

[base]   
#name=Red Hat Linux $releasever - $basearch - Base   
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/   
name=Red Hat Linux $releasever - $basearch - Base   
baseurl= http://centos.ustc.edu.cn/centos/4/os/i386/   
#[updates]   
#name=Red Hat Linux $releasever - Updates   
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/   
name=Red Hat Linux $releasever - Updates   
baseurl= http://mirror.centos.org/centos/4/updates/i386/   

[base] #name=Red Hat Linux $releasever - $basearch - Base   
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/   
name=Red Hat Linux $releasever - $basearch - Base   
baseurl= http://centos.ustc.edu.cn/centos/4/os/i386/

 

 

yum update

你可能感兴趣的:(redhat yum)