Linux学习笔记---RHEL-5配置CentOS-5的yum源
2011-06-09 15:49
603 查看
相信大部分使用Red Hat Enterprise Linux 5的人都是没有注册的RHEL5,这样导致我们无法使用红帽提供的yum源来更新软件。
由于CentOS-5是RHEL-5的山寨版,所以我们可以使用CentOS-5的yum源来达到在RHEL-5下更新软件。
首先备份一下原本的repo文件,这个步骤就不写出来了。
然后在原来的repo文件下,添加以下内容
[base]
name=Red Hat Enterprise Linux $releasever -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=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=Red Hat Enterprise Linux $releasever -Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/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=Red Hat Enterprise Linux $releasever -Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=Red Hat Enterprise Linux $releasever -Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
注:也可以把RHEL-5自带的repo文件删掉,重新建立一个repo文件,添加以上的内容。
接着导入RPM=KEY
rpm --import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
最后清理以下缓存
yum clean all
到这里就OK了,可以测试一下能否使用
yum list
由于CentOS-5是RHEL-5的山寨版,所以我们可以使用CentOS-5的yum源来达到在RHEL-5下更新软件。
首先备份一下原本的repo文件,这个步骤就不写出来了。
然后在原来的repo文件下,添加以下内容
[base]
name=Red Hat Enterprise Linux $releasever -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=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=Red Hat Enterprise Linux $releasever -Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/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=Red Hat Enterprise Linux $releasever -Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=Red Hat Enterprise Linux $releasever -Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
注:也可以把RHEL-5自带的repo文件删掉,重新建立一个repo文件,添加以上的内容。
接着导入RPM=KEY
rpm --import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
最后清理以下缓存
yum clean all
到这里就OK了,可以测试一下能否使用
yum list
相关文章推荐
- LInux学习笔记---RHEL6配置本地yum源
- Linux学习笔记---RHEL6上配置RAID
- Linux学习笔记之Centos 6.3下NFS的安装配置
- Linux学习笔记之RedHat Enterprise Linux 6.4 使用 Centos 6 的yum源问题
- 学习笔记1——Linux(CentOS)在虚拟机上最小化安装之后的网络配置及其与主机的连接
- linux学习笔记--RHEL7 配置SSH供windows上使用PUTTY链接
- 【Linux学习笔记】40:配置自己的桌面版CentOS6.9
- Linux运维笔记----RHEL7.1之yum源配置与软件安装
- 学习笔记1——Linux(CentOS)在虚拟机上最小化安装之后的网络配置及其与主机的连接
- RHCE 6.0学习笔记-2 RHEL 6 使用光盘配置本地YUM源
- Linux学习笔记之RedHat Enterprise Linux 6.4 使用 Centos 6 的yum源问题
- Linux学习笔记之RedHat Enterprise Linux 6.4 使用 Centos 6 的yum源问题
- 【linux学习笔记】samba在RHEL7上配置
- RHEL(Red Hat Enterprise Linux)配置YUM源
- 马哥linux学习笔记(bash变量配置)
- hadoop学习笔记1--centos6.2 64位 最小化(minimal)安装配置
- solr学习笔记-linux下配置solr
- linux修改或者配置IP地址、网络YUM源(针对Centos)
- Zynq-Linux移植学习笔记之十-u-boot网络配置
- 我的Linux学习二(CentOS 7的网络配置)