【搬运工】RHEL6.5 移植使用CentOS 的YUM 步骤
转载地址:http://www.cnblogs.com/rchen98/p/6056469.html
问题:使用 Red Hat Enterprise Linux Server(RHEL) yum安装软件时显示 This system is not registered with RHN. RHN support will be disabled.
原因:
Red Hat Enterprise Linux Server(RHEL) 的yum服务是付费的,因为没有付费,所以无法使用yum安装软件,如RHEL想安装YUM,一种可行的办法是移植使用CentOS的YUM。
解决方法:
步骤一:卸载RHEL的yum,并下载CentOS的对应软件包
执行:rpm -qa|grep yum|xargs rpm -e --nodeps 将yum卸载掉
cat /etc/issue && uname -a 看一下系统版本号和系统位数
到 http://mirrors.kernel.org/centos/ 或 http://mirrors.163.com/centos/ 找对应系统版本号
如果系统是5.* 64位,则打开http://mirrors.kernel.org/centos/5/os/x86_64/CentOS/
如果系统是5.* 32位,则打开http://mirrors.kernel.org/centos/5/os/i386/CentOS/
如果系统是6.* 64位:http://mirrors.kernel.org/centos/6/os/x86_64/Packages/
如果系统是6.* 32位:http://mirrors.kernel.org/centos/6/os/i386/Packages/
下载的文件包括:
python-iniparse-0.3.1-2.1.el6.noarch.rpm
python-urlgrabber-3.9.1-11.el6.noarch.rpm
yum-3.2.29-73.el6.centos.noarch.rpm
yum-metadata-parser-1.1.2-16.el6.i686.rpm
yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
步骤二:安装CentOS的对应软件包
安装步骤:
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
这一步可能出如下错误
warning: python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.py from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyc from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyo from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyc from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyo from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch
原因是包冲突,需要卸载原有的urlgrabber包:
[root@rchen98]# rpm -qa |grep urlgrabber
python-urlgrabber-3.9.1-8.el6.noarch
[root@rchen98]# rpm -e python-urlgrabber-3.9.1-8.el6.noarch
然后再安装。
然后安装yum
rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
步骤三:生成yum.repos.d文件
到http://mirrors.163.com的 centos帮助文档 中下载CentOS6-Base-163.repo文件,存放到/etc/yum.repos.d中
#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
改名为:CentOS6-Base.repo
然后把文件里的$releasever都改为你的Linux版本(6或者5),也就是文件修改成如下即可:
# 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.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
步骤四:重建缓存
yum clean all 清除原有缓存
yum makecache 获取yum列表
等待,大约三分钟后出现下面提示,表示yum更改完成:
Metadata Cache Created。
----------------------------------------------------------------------------------------------------
补充:把文件里的$releasever都改为你的Linux版本6,可使用如下命令:
:1,$s/$releasever/6
注意:无论你的Linux版本是6.5还是6,都需要统一写6,下载yum包时,也需要选择到6版本。
【搬运工】RHEL6.5 移植使用CentOS 的YUM 步骤的更多相关文章
- RHEL6.5 移植使用CentOS 的YUM 步骤
问题:使用 Red Hat Enterprise Linux Server(RHEL) yum安装软件时显示 This system is not registered with RHN. RHN s ...
- CentOS使用yum源中自带的rpm包安装LAMP环境
CentOS使用yum源中自带的rpm包安装LAMP环境.这是Linux下安装LAMP的环境一种最基本最简便的方式.新手可以从容安装使用. 1. 安装基础包(可选安装)yum install -y w ...
- centos'的yum安装php的memcache扩展
centos'的yum安装php的memcache扩展 博客分类: linux 让php能使用memcached服务的扩展有两种:memcache 和 memcached 1. 先安装libmem ...
- CentOS更新yum源
CentOS更新yum源 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载 ...
- centOS下yum安装配置samba
centOS下yum安装配置samba 2010-03-29 15:46:00 标签:samba yum centOS 安装 休闲 注意:本文的原则是只将文件共享应用于内网服务器,并让将要被共享的目 ...
- Centos更新yum packet源
在使用Centos时,常常会遇到使用yum安装某些系统依赖包,特别是第三方软件库(如openstack软件库)时,无法找到包源.因此,需要将Centos的yum源进行更新,扩展,以便可以通过yum的方 ...
- centos在yum install报错:Another app is currently holding the yum lock解决方法
centos在yum install报错:Another app is currently holding the yum lock,这个问题可能是很多的新手经常遇到问题,之前也有人问我,包括本人在刚 ...
- centos下yum安装crontab+mysql自动备份
参考博文: centos下yum安装crontab yum install vixie-cron crontabs //安装 chkconfig crond on ...
- CentOS 使用yum命令安装Java SDK(openjdk)
CentOS 6.X 和 5.X 自带有OpenJDK runtime environment (openjdk).它是一个在linux上实现开源的java 平台.CentOS yum 命令 安装 ...
随机推荐
- TinyMCE常用插件
Advanced Tables 基于table插件的增强表格插件,添加了排序功能. tinymce.init({ plugins: 'table advtable', menubar: 'table' ...
- 关于IOS AFNetWorking内存泄漏的问题
之前项目中用Instruments的leaks检测APP,结果发现APP的网络请求会出现内存泄漏,暂时我先使用单例的方式暂时解决了内存泄漏的原因,但是我还没有找打根本原因.希望有研究的小伙伴可以相互探 ...
- Yum项目上线实战 (网站运维)-Linux从入门到精通第十一天(非原创)
文章大纲 一.编译安装与卸载Nginx二.关于LAMP三.LAMP环境部署四.学习资料下载五.参考文章 一.编译安装与卸载Nginx Nginx:是一款比较流行的web服务器软件,类似于Apach ...
- 【学习笔记】PYTHON网络爬虫与信息提取(北理工 嵩天)
学习目的:掌握定向网络数据爬取和网页解析的基本能力the Website is the API- 1 python ide 文本ide:IDLE,Sublime Text集成ide:Pychar ...
- metrics-server 安装问题解决
参考: https://www.qikqiak.com/post/install-metrics-server/ git clone https://github.com/kubernetes- ...
- SpringBoot配置多注册中心(yml,properties)
dubbo-2.6.6 dubbo.config.multiple=true dubbo.registries.z1.timeout = 5000 dubbo.registries.z1. ...
- Caused by: java.lang.ClassNotFoundException: Cannot find class:
Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibat ...
- ActiveMQ消息可靠性-事物
事物偏生产者,签收偏消费者 设置为true,需要手动提交 设置为false,自动提交 使用手动提交的好处就是可以回滚,当整个事物提交时,里面的某条失败了,可以事物回滚,于是保证了数据的一致性 ...
- pointnet++论文的翻译
参考: https://blog.csdn.net/weixin_40664094/article/details/83902950 https://blog.csdn.net/pikachu_777 ...
- Python进阶-III 函数装饰器(Wrapper)
1.引入场景: 检查代码的运行时间 import time def func(): start = time.time() time.sleep(0.12) print('看看我运行了多长时间!') ...