欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

redhat 下安装yum

程序员文章站 2024-01-05 23:06:46
...

 

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