Red hat免费使用CentOS源
来源:互联网 发布:什么叫淘宝流量 编辑:程序博客网 时间:2024/05/01 21:50
1、下载CentOS资源库配置文件
http://mirrors.163.com/.help/centos.html
根据自己Red Hat的版本选择下载,本人机器为:Red Hat Enterprise Server 6.3,所以下载CentOS6
2、修改配置文件
CentOS配置文件内容为:
# CentOS-Base.repo## 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 - 163.combaseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates [updates]name=CentOS-$releasever - Updates - 163.combaseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updatesgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be useful[extras]name=CentOS-$releasever - Extras - 163.combaseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extrasgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plus - 163.combaseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplusgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-$releasever - Contrib - 163.combaseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
需要将文件中的$releasever全部替换为系统相应的版本,以本机为例,替换为6。如果是使用vim打开的本文件,可以使用命令::%s/$releasever/6
这样全部的$releasever被替换为6,替换后的配置文件如下:
# CentOS-Base.repo## 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-6 - Base - 163.combaseurl=http://mirrors.163.com/centos/6/os/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates [updates]name=CentOS-6 - Updates - 163.combaseurl=http://mirrors.163.com/centos/6/updates/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updatesgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be useful[extras]name=CentOS-6 - Extras - 163.combaseurl=http://mirrors.163.com/centos/6/extras/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extrasgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-6 - Plus - 163.combaseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplusgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-6 - Contrib - 163.combaseurl=http://mirrors.163.com/centos/6/contrib/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-63、将CentOS6-Base-163.repo文件置于目录/etc/yum.repos.d目录下
4、yum clean all //清除原有缓存
5、yum -y update //更新仓库
本文为Eliot原创,转载请注明出处:http://blog.csdn.net/xyw_blog/article/details/15701429
- Red hat免费使用CentOS源
- Red Hat 7.2 配置使用CentOS 7.2 Yum 源
- Red Hat 7.0 配置使用CentOS 7.0 Yum 源
- Red Hat 6.5 配置使用CentOS 6.5 Yum 源
- Red Hat 6.7 配置使用centos的yum源
- Red Hat Enterprise Linux Server6.5使用CentOS yum源更新的方法
- Red Hat 6.5-32 配置使用CentOS 6.5-32 Yum 源
- red hat centos 安装 yum
- RED HAT 系统使用yum网络源
- red hat使用
- Red Hat 5.0配置CentOS的YUM源
- 安装centOS (red hat linux)的Repoforge源
- Red Hat Enterprise Linux 6.4配置CentOS 6.4软件源
- Red Hat 6.5 配置 CentOS 6.5 Yum 源
- Red Hat 6.5配置 Centos 6.5 本地yum源
- Red Hat Linux安装CentOS的yum源
- Red Hat Linux安装CentOS的yum源
- Red Hat Linux安装CentOS的yum源
- Git深入体验之旅五:分布式Git
- Consistent Hashing
- web页面登录校验码
- JAVA单例(懒汉模式)线程安全
- Hibernate —— HQL与QBC的区别
- Red hat免费使用CentOS源
- 精通Android3学习笔记(一)基础知识
- 拥有 RDBMS 特性的 NoSQL 数据存储
- UVA 10905 - Children's Game
- oracle 查询语句大全
- 使用MPI编译Linux平台下使用的并行SuperLU静态链接库
- 《Android攻略》客户端和Service交互
- 工作环境迁移:Ubuntu 12.04 使用笔记(一)
- 10359 - Tiling (递推,类斐波那契)