菜虫学电脑
您当前的位置:首页 > LINUX > 其它发行版本

linux CentOS 5.3 yum源配置过程详解

来源:  评论: 条  收藏本文  去论坛

本文 Tags:内容 备份 用户 此文 加载

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了,我亲自试验过的!!


 

 

我要分享到: 新浪|微博新浪微博 百度|Hi空间百度空间 分享到QQ空间QQ空间 开心网开心网 校内|人人网人人网 豆瓣网豆瓣网 搜狐|白社会搜狐白社会 QQ微博

 

   最新图文资讯
   相关文章
发表评论 共有条评论  [ 查看全部 ]
用户名: 密码: 匿名发表
验证码:     
 
推荐文章
QQ2011新功能体验版诚邀试用
QQ2011新功能体验版诚
[多图]细数QQ历年Banner
[多图]细数QQ历年Bann
值得一试的6个Ubuntu系统变种
值得一试的6个Ubuntu
Ubuntu 11.10 默认软件的变化
Ubuntu 11.10 默认软
栏目更新
栏目热门
网站首页 - 广告服务 - 友情链接 - 联系我们 - 请来留言 - 网站地图 - WAP - -