免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 843 | 回复: 0
打印 上一主题 下一主题

更改centos 5 yum源 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-23 11:15 |只看该作者 |倒序浏览
               
                [color="#0000ff"]根据需要选择设置源:
[color="#0000ff"]一、如何设置CentOS 5的yum源为上海交通大学网站
[color="#0000ff"]二、设置yum源为国内的服务器
[color="#0000ff"]三、CentOS 下使用本地镜像源
[color="#0000ff"]一。如何设置CentOS 5的yum源为上海交通大学网站
[color="#0000ff"]1.修改/etc/yum.repos.d/CentOS-Base.repo为:
[color="#0000ff"]CentOS-Base.repo
[color="#0000ff"][base]
[color="#0000ff"]name=CentOS-5 - Base
[color="#0000ff"]#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&
[color="#0000ff"]repo=os
[color="#0000ff"]#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
[color="#0000ff"]baseurl=http://ftp.sjtu.edu.cn/centos/5.0/os/$basearch/
[color="#0000ff"]gpgcheck=1
[color="#0000ff"]gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[color="#0000ff"]#released updates
[color="#0000ff"][update]
[color="#0000ff"]name=CentOS-5 - Updates
[color="#0000ff"]#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
[color="#0000ff"]baseurl=http://ftp.sjtu.edu.cn/centos/5.0/updates/$basearch/
[color="#0000ff"]gpgcheck=1
[color="#0000ff"]gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[color="#0000ff"]#packages used/produced in the build but not released
[color="#0000ff"][addons]
[color="#0000ff"]name=CentOS-5 - Addons
[color="#0000ff"]#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
[color="#0000ff"]baseurl=http://ftp.sjtu.edu.cn/centos/5.0/addons/$basearch/
[color="#0000ff"]gpgcheck=1
[color="#0000ff"]gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[color="#0000ff"]#additional packages that may be useful
[color="#0000ff"][extras]
[color="#0000ff"]name=CentOS-5 - Extras
[color="#0000ff"]#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
[color="#0000ff"]baseurl=http://ftp.sjtu.edu.cn/centos/5.0/extras/$basearch/
[color="#0000ff"]gpgcheck=1
[color="#0000ff"]gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[color="#0000ff"]#additional packages that extend functionality of existing packages
[color="#0000ff"][centosplus]
[color="#0000ff"]name=CentOS-5 - Plus
[color="#0000ff"]#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
[color="#0000ff"]baseurl=http://ftp.sjtu.edu.cn/centos/5.0/centosplus/$basearch/
[color="#0000ff"]gpgcheck=1
[color="#0000ff"]enabled=0
[color="#0000ff"]gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[color="#0000ff"]#contrib - packages by Centos Users
[color="#0000ff"][contrib]
[color="#0000ff"]name=CentOS-5 - Contrib
[color="#0000ff"]#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
[color="#0000ff"]baseurl=http://ftp.sjtu.edu.cn/centos/5.0/contrib/$basearch/
[color="#0000ff"]gpgcheck=1
[color="#0000ff"]enabled=0
[color="#0000ff"]gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
[color="#0000ff"]2.执行
[color="#0000ff"]64位:
[color="#0000ff"]rpm --import
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/93926/showart_1873618.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP