中国科技大学:http://centos.ustc.edu.cn/centos/ (推荐,比较快)
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.2为例)
[root@xuxy yum.repos.d]#vi CentOS-Base.repo
内容如下(以中国科技大学的yum源为例):
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://centos.ustc.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://centos.ustc.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://centos.ustc.edu.cn/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://centos.ustc.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://centos.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
----------------------
:wq 退出后,再执行:
rpm --import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
如果出现找不到name 或其他网络错误 则是DNS 没加进去 ,参考上篇文章。
分享到:
相关推荐
Linux内核源代码导读 中国科学技术大学计算机系 陈香兰 Linux内核源代码导读 中国科学技术大学计算机系 陈香兰 Linux内核源代码导读 中国科学技术大学计算机系 陈香兰
中国科学技术大学计算机系Linux内核源代码导读 是一个ppt,不喜欢勿下。
linux国内pip源,采用豆瓣的pip源,适用于所有系统,解压即可用
oracle安装教程之Linux更换yum源
一、实验目的 1.了解Linux字符界面的操作特点,验证Linux命令的用途,掌握Linux的基本操作、管理、帮助、编辑命令。 2. 熟悉Linux字符界面下使用工具进行文本过滤、编辑的方法 3.能够启动和使用案例系统。
Oracle Linux更新Yum源还是挺方便的,比Red Hat省事很多,而且在6.3的版本中,默认已经有重新编译可用的Yum了。
包含课程课件、实验报告和期末复习指南
linux0.01版本源代码 简单易于理解,适用于初次读linux内核源代码
Linux内核源代码导读.ppt 中国科学技术大学计算机系 陈香兰
Linux C源代码Linux C源代码Linux C源代码Linux C源代码Linux C源代码Linux C源代码Linux C源代码Linux C源代码Linux C源代码Linux C源代码Linux C源代码Linux C源代码
linux-2.4.18 源代码
linux内核源代码深度解析linux内核源代码深度解析linux内核源代码深度解析linux内核源代码深度解析linux内核源代码深度解析linux内核源代码深度解析linux内核源代码深度解析linux内核源代码深度解析linux内核源代码...
2.基本掌握Linux字符模式下的编译工具和调试工具的使用 3.掌握自动编译工具make的使用和Makefile的编写方法 二、实验设计 1.GCC使用方法 2.调试器GDB使用方法(选做) 3.编译配置工具Make工具使用 4.Linuxer编译...
linux内存管理源代码导读 pdf格式
linux 国内镜像源配置以及报错解决的方法
机试题笔试题均有 10-11年试题 08-09年试题 07-08年试题
linux的一些源代码 shell的简易代码实现 linux的一些源代码 shell linux的一些源代码 shell
linux0.01内核源代码...linux0.01内核源代码
国防科技大学一位博士linux授课PPT。
linux_0.11源代码 完整的代码 linux_0.11