RHEL5.1使用Centos源

一、下载yum软件包
wget   ftp://ftp.pdc.kth.se/pub/bambi/centos/5.0/os/i386/CentOS/yum-3.0.5-1.el5.centos.2.noarch.rpm
wget   ftp://ftp.pdc.kth.se/pub/bambi/centos/5.0/os/i386/CentOS/yum-updatesd-3.0.5-1.el5.centos.2.noarch.rpm
rpm -ivh yum-3.0.5-1.el5.centos.2.noarch.rpm yum-updatesd-3.0.5-1.el5.centos.2.noarch.rpm
二、在/etc/yum.repos.d目录下建立CentOS-Base.repo文件
[root@RHEL yum.repos.d]# cat CentOS-Base.repo
######################
[base]
name=CentOS-5 - Base
repo=os
baseurl=http://centos.ustc.edu.cn/centos/5.3/os/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[update]
name=CentOS-5 - Updates
baseurl=http://centos.ustc.edu.cn/centos/5.3/updates/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[addons]
name=CentOS-5 - Addons
baseurl=http://centos.ustc.edu.cn/centos/5.3/addons/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[extras]
name=CentOS-5 - Extras
baseurl=http://centos.ustc.edu.cn/centos/5.3/extras/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[centosplus]
name=CentOS-5 - Plus
baseurl=http://centos.ustc.edu.cn/centos/5.3/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[contrib]
name=CentOS-5 - Contrib
baseurl=http://centos.ustc.edu.cn/centos/5.3/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
###################
 
 
测试安装
yum -y install http

你可能感兴趣的:(centos,职场,休闲)