RHEL6.5 移植使用CentOS 的YUM 步骤
问题:使用 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.combaseurl=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.combaseurl=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.combaseurl=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.combaseurl=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.combaseurl=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
RHEL6.5 移植使用CentOS 的YUM 步骤的更多相关文章
- 【搬运工】RHEL6.5 移植使用CentOS 的YUM 步骤
转载地址:http://www.cnblogs.com/rchen98/p/6056469.html 问题:使用 Red Hat Enterprise Linux Server(RHEL) yum安装 ...
- centOS下yum安装配置samba
centOS下yum安装配置samba 2010-03-29 15:46:00 标签:samba yum centOS 安装 休闲 注意:本文的原则是只将文件共享应用于内网服务器,并让将要被共享的目 ...
- Centos更换yum源
Centos更换yum源 步骤如下: 备份原始源 cd /etc/yum.repos.d/ mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/ ...
- redhat6下安装centos的yum源
因为redhat中的yum是收费的,未注册时不允许使用的,下面是挂载光盘后的情况,未挂载是没有yum命令.但是下面即便挂载了也是需要验证的 [root@localhost /]# yum instal ...
- centos 7 yum 安装 mysql glib 安装 mysql
centos 7 YUM 在线安装版 1.wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm 下载 2.rpm ...
- centos的yum配置
什么是yum ?yum,是Yellow dog Updater Modified的简称,起初是由yellow dog这一发行版的开发者Terra Soft研发,用python写成,那时还叫做yup(y ...
- 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.下载 ...
随机推荐
- svn报错:[Previous operation has not finished; run 'cleanup' if it was interrupted] 的排错过程
今天在打开某一文档的情况下,使用SVN更新文档,在更新的过程中报错,提示需要执行clean up,果断右键执行clean up,又提示一个新的错误:"Previous operation h ...
- Oracle 的查询组合语句
select a.core_txn_srl_no||a.c_dept||a.c_batch||lpad(a.c_opr_no,5,'0')||case a.txn_dr_cr_ind when ' ...
- [Shell]多姿势反弹shell
客户端监听本地: nc -nvlp 4444 从原生的 shell 环境切换到 linux 的交互式 bash 环境: python -c 'import pty; pty.spawn("/ ...
- 在 Ubuntu/Debian 下安装 PHP7.3 教程
介绍 最近的 PHP 7.3.0 已经在 2018 年12月6日 发布 GA,大家已经可以开始第一时间体验新版本了,这里先放出 PHP7.3 安装的教程以便大家升级. 适用系统: Ubuntu 18. ...
- 大白话说Java反射:入门、使用、原理 (转)
文章首发于[博客园-陈树义],点击跳转到原文<大白话说Java反射:入门.进阶.原理> 目录 一个简单的例子 反射常用API 获取反射中的Class对象 通过反射创建类对象 通过反射获取类 ...
- JS简单获取当前日期时间的方法(yyyy-MM-dd hh:mm:ss)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xht ...
- sql脱库的几种方法
当发现sql注入之后,脱库的方法,有以下几种: (1)当目标主机支持外部连接时,使用Navicat 进行连接!当时目标主机不同,使用的Navicat种类不一样: mysql : Navicat f ...
- 关于python的四舍五入
参考https://blog.csdn.net/qq_39234705/article/details/82817703 四舍五入有很多相关资料,主要用两种方法round()和'%.2f' 两种方法取 ...
- 【Python】解析Python中的线程与进程
基础知识 线程 进程 两者的区别 线程的类型 Python 多线程 GIL 创建多线程 线程合并 线程同步与互斥锁 可重入锁(递归锁) 守护线程 定时器 Python 多进程 创建多进程 多进程通信 ...
- 公司-IT-Yahoo:百科
ylbtech-公司-IT-Yahoo:百科 雅虎(英文名称:Yahoo!,NASDAQ:YHOO)是美国著名的互联网门户网站,也是20世纪末互联网奇迹的创造者之一.其服务包括搜索引擎.电邮.新闻等, ...