在 RHEL 中使用 CentOS repositories
来源:互联网 发布:量化投资 python 编辑:程序博客网 时间:2024/06/08 13:12
禁用 RHEL 的每个仓库配置
修改目录 /etc/yum.repos.d 下每个文件,将 enable=1 改为 enable=0,或者也可以将这个目录清空
建立 CentOS 的配置 /etc/yum.repos.d/centos.repo ,内容为:
[CentOS5 base]name=CentOS-5-Basemirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=osgpgcheck=1enabled=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5[CentOS5 updates]name=CentOS-5-Updatesmirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updatesgpgcheck=1enabled=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5[CentOS5plus]name=CentOS-5-Plusmirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplusgpgcheck=1enabled=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
这些仓库需要 GPG 验证,还需要把公钥复制下来。 或者也可以将 centos.repo 中 gpgcheck=1 改为 gpgcheck=0 来避免验证:
rpm --import http://isoredirect.centos.org/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
测试是否可用
# yum list availableLoaded plugins: product-id, refresh-packagekit, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Bad id for repo: CentOS5 base, byte = 7Bad id for repo: CentOS5 updates, byte = 7
上面的仓库地址是在 这里 找到的,因为 仓库 ID 带了空格造成 错误 Bad id for repo: CentOS5 base, byte = 7,去掉空格就可以了
Bad id 说的就是 repo 文件中方括号中的 仓库 ID, byte = 7 为引起错误的地方
对于 “This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register” 问题
可在使用 yum 时禁用相应插件,如:
yum --disableplugin=subscription-manager list available
或 将 /etc/yumconf 中 plugins=1 改为 plugins=0 来禁用所有插件
也可以禁用指定插件,在 /etc/yum/pluginconf.d 下找到插件对应的文件 ,如要禁用 subscription-manager 插件,修改 /etc/yum/pluginconf.d/subscription-manager.conf 文件
将 enabled=1 改为 enabled=0 即可
如果要得到更好的支持,可以把 CentOS 的 Release Node : centos-release 和 centos-release-notes 安装上
0 0
- 在 RHEL 中使用 CentOS repositories
- 如何在RHEL/CentOS 7.0中使用tmpfs
- 在 RHEL/CentOS 7.0 中安装 LAMP
- RHEL 7.2 Centos 7.2 中如何在命令行中使用/操作/配置无线网卡wifi
- 在CentOS & RHEL环境中使用RVM安装Ruby 2.1.8
- 如何在RHEL/CentOS 7以及Fedora中配置FirewallD
- 在CentOS/RHEL 6.2上使用YUM安装PHP5.4
- 在RHEL/CentOS 5.5里安装使用Chrome/Chromium浏览器
- 在RHEL/CentOS 5.5里安装使用Chrome/Chromium浏览器
- 在CentOS/RHEL 6.2上使用YUM安装PHP5.4
- Fedora (Redhat, RHEL,CENTOS)中使用sudo
- 删除CentOS / RHEL的库和配置文件(Repositories and configuraiton files)
- CentOS/RHEL中TCP优化
- RHEL使用centos更新源
- CentOS常用repositories
- 在RHEL中查询磁盘使用的io调度算法
- 在CentOS/RHEL上源码安装Git
- 在CentOS/RHEL 6.4上安装Chromium
- 国家测绘局干部双向挂职锻炼管理暂行办法
- 诸葛亮给子书
- 列表菜单里,初始化的值一定要选第一个
- OCP-1Z0-053-200题-184题-270
- 2037——今年暑假不AC
- 在 RHEL 中使用 CentOS repositories
- Eclipse高级调试技巧
- OCP-1Z0-053-200题-183题-232
- Struts2文件上传
- iOS Dev (38) 你不一定看懂了 main.m 文件
- Struts2拦截器
- FilterDispatcher is depredated!plesae use the new filters
- 跨平台移动开发phonegap/cordova 3.3全系列教程-目录
- ajax(二) ajax处理返回数据格式xml 实例