RHEL4安装配置YUM源

1. 用wget下载yum (两个很好的RPM包下载站:rpm.pbone.net和rpmfind.net)

# wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/linuxram/SLES_9/noarch/yum-2.0.8-1.1.noarch.rpm


2. 安装此rpm文件

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


3. 配置 /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=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


4. 安装CentOS的GPG Key

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


5. 测试yum是否正常(下面是更新所有的rpm)

# yum update
 

6. 自动选择最快源

# 下载并安装: yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm

 
 

你可能感兴趣的:(LINUX)