time 
设为首页】【收藏本站
当前位置: 主页 > Unix/Linux > Linux管理 > Linux服务 > linux CentOS 5.3 yum源配置过程详解

linux CentOS 5.3 yum源配置过程详解

时间:2010-01-26 22:37 点击:2893次 字体:[ ]




1.以root用户进入CentOS系统。
[root@xuxy ~]# cd /etc/yum.repos.d
2.备份repo
[root@xuxy yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
3.建立新的CentOS-Base.repo文件:(以CentOS 5.3为例)
[root@xuxy yum.repos.d]#vi CentOS-Base.repo
内容如下:

[base]

name=CentOS-5 - Base

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&

repo=os

#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/os/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

 

#released updates

[update]

name=CentOS-5 - Updates

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/updates/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

 

#packages used/produced in the build but not released

[addons]

name=CentOS-5 - Addons

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons

 

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/addons/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

 

#additional packages that may be useful

[extras]

name=CentOS-5 - Extras

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras

 

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/extras/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

 

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-5 - Plus

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

 

#contrib - packages by Centos Users

[contrib]

name=CentOS-5 - Contrib

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

(保存并退出:wq)

现在可以yum了。^_^

如果不能运行,请加载yum-3.2.19-18.e15.centos.noarch.rpm

即执行命令#rpm -ivh yum-3.2.19-18.e15.centos.noarch.rpm

如果还不能运行请下载yum-metadata-parser-1.1.2-2.el5.i386.rpm和

yum-3.2.19-18.el5.centos.noarch.rpm此两个文件,并安装此文件

即执行命令#rpm -ivh yum-3.2.19-18.el5.centos.noarch.rpm

                 #rpm - ivh yum-metadata-parser-1.1.2-2.el5.i386.rpm

这样就肯定能运行yum了,我亲自试验过的!!



本文地址 : http://www.fengfly.com/plus/view-168488-1.html
标签: Linux CentOS YUM 源配置
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
验证码: