RHEL使用yum更新
2011-11-24 14:27
295 查看
RHEL和CentOS的关系大家应该都明白,RHEL由于是商业软件未付费自然是不能更新的,我们可以通过CentOS的源来更新,效果是一样的......
在 /etc/yum.repos.d/ 目录下新建一个文件 CentOS-Base.repo
#vi CentOS-Base.repo
已经存在的rhel-debuginfo.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/os/$basearch/
gpgcheck=0
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/updates/$basearch/
gpgcheck=0
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/addons/$basearch/
gpgcheck=0
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/extras/$basearch/
gpgcheck=0
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/centosplus/$basearch/
gpgcheck=0
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/contrib/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
这个源地址不能保证一直有效,保存完以后开始下载更新
#yum update
速度还不算慢,享受更新的乐趣吧!
唯一不好的地方就是会把红帽的标志去掉换成CentOS的,不过对系统没有任何影响,如果你是一个红帽的粉丝,请慎用!
本文出自 “我的地盘” 博客,请务必保留此出处http://tycool.blog.51cto.com/696627/723600
在 /etc/yum.repos.d/ 目录下新建一个文件 CentOS-Base.repo
#vi CentOS-Base.repo
已经存在的rhel-debuginfo.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/os/$basearch/
gpgcheck=0
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/updates/$basearch/
gpgcheck=0
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/addons/$basearch/
gpgcheck=0
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/extras/$basearch/
gpgcheck=0
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/centosplus/$basearch/
gpgcheck=0
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/contrib/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
这个源地址不能保证一直有效,保存完以后开始下载更新
#yum update
速度还不算慢,享受更新的乐趣吧!
唯一不好的地方就是会把红帽的标志去掉换成CentOS的,不过对系统没有任何影响,如果你是一个红帽的粉丝,请慎用!
本文出自 “我的地盘” 博客,请务必保留此出处http://tycool.blog.51cto.com/696627/723600
相关文章推荐
- 如何使用 yum-cron 自动更新 RHEL/CentOS Linux | Linux 中国
- 在RHEL 6.5上使用yum更新/安装软件
- 如何使用 yum-cron 自动更新 RHEL/CentOS Linux
- 在RHEL 6.5上使用yum更新/安装软件的操作方法
- RHEL使用yum安装报文件需要更新的错误提示的解决办法
- RHEL 5.3使用Centos 5.3的 yum 源进行更新和安装软件
- RHEL6.0使用centos的YUM更新源
- 使用yum 代替up2date 自动更新升级RedHat AS3
- rhel6上如何使用iso镜像文件搭建yum
- RHEL6使用yum并替换163源
- RHEL5.5_yum的安装和使用
- 使用163.com的Centos6 yum源,更新RHEL6系统
- rhel6使用yum安装软件
- CentOS 7 更新源 – 使用国内 163 yum 源
- RHEL 6.4使用CentOS 6.4 yum源更新-i386的脚本
- 三种yum更新插件 EPEL , RPM Fusion ,RPMforge 使用感
- rhel5 没有注册不能使用yum?
- RHEL使用yum安装mongodb
- RHEL使用centos更新源
- RHEL5.5_yum的安装和使用