Linux:redhat6.5使用yum时提示需要注册问题解决方案
Linux:redhat6.5使用yum时提示需要注册问题解决方案
一、问题
新安装了redhat6.5.安装后,登录系统,使用yum时候。提示:
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
无法使用。
redhat 默认自带的 yum 源需要注册,才能更新。我们想不花钱也可以更新,需要替换掉redhat的yum源。
二、检查是否安装yum包
rpm -qa |grep yum

三、删除redhat自带的yum包
卸载上面显示的所有yum包(不检查依赖,直接删除rpm包):
rpm -qa|grep yum|xargs rpm -e --nodeps
再用命令查看是否已卸载
rpm -qa |grep yum
查看无信息显示表示已经卸载完成;
四、下载新的yum包(使用Centos6.5的yum包)
wget http://mirrors.163.com/centos/6/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm
wget http://mirrors.163.com/centos/6/os/i386/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
五、安装yum软件包
注意:单个的安装包可能会依赖其它包(例如yum和yum-fastestmirror会相互依赖),所以我们可以把所有这些包放在一起,用一行命令将它们同时安装即可:
rpm -ivh yum-metadata-parser-1.1.2-16.el6.i686.rpm yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
六、更换yum源(使用163的源)
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
vi CentOS6-Base-163.repo
编辑文件,把文件里面的$releasever全部替换为版本号,即更改为6,最后保存!或者直接把下面的内存拷贝到CentOS6-Base-163.repo文件中即可(已经修改好)
# 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.5&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.5&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.5&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.5&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.5&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
七、清除原有缓存
#重建缓存,以提高搜索安装软件的速度
yum clean all
八、更新系统
yum update
Linux:redhat6.5使用yum时提示需要注册问题解决方案的更多相关文章
- linux虚拟机 在install yum时提示无法获得锁 var/lib/dekg/lock时该如何解决?
起因 在新虚拟机中使用yum命令时提示要安装,安装过程中提示出错. 问题 在sudo apt install yum时提示下列错误该如何解决? E: 无法获得锁 /var/lib/dpkg/lock ...
- 首次使用windows管理界面访问安装在UNIX或linux下的DP服务器时提示无权限访问的解决方法
用windwos GUI管理界面连接时提示无权限访问: 在/etc/opt/omni/server/users/userlist 添加一行: "" "*" &q ...
- 转载:Linux下执行SVN命令时提示错误:Valid UTF-8 data
在Linux下执行svn add *时出现如下错误: svn: Valid UTF-8 data(hex: 4b)followed by invalid UTF-8 sequence(hex: ...
- Linux tar命令解压时提示时间戳异常的处理办法
在Linux服务器上的文件会有3个时间戳信息 访问时间(Access).修改时间(Modify).改变时间(Change),都是存放在该文件的Inode里面 问题描述: 公司网站是前后端分离的,所有的 ...
- 在linux上使用impdp命令时提示ORA-12154: TNS:could not resolve the connect identifier specified的问题
今天在一台linux服务器上用impdp命令导入dmp文件时出现了错误: ORA: TNS:could not resolve the connect identifier specified 我使用 ...
- Linux cp一个文件夹时提示cp: omitting directory `test/'
将一个文件夹test 复制到地址/opt/tmp下,提示出错: cp: omitting directory `test/' 原因: test 目录下还有目录,不能直接进行拷贝. 我们先找下cp 的命 ...
- linux服务器git pull/push时提示输入账号密码之免除设置
1.先cd到根目录,执行git config --global credential.helper store命令 [root@iZ25mi9h7ayZ ~]# git config --global ...
- 【转】卸载VMware时提示“The MSI failed”解决方案
转载地址: http://www.2cto.com/os/201309/243843.html 安装精简版VM后再安装其他版本的VM,或者想升级安装更高的版本时,无法正常卸载(如提示The MSI ...
- ThinkPHP5 正则验证中有“|”时提示“规则错误”的解决方案
正则规则中有“|”时,会引起解析错误: 'regex:\d{3,4}[\s,-]?\d{7,8}|1[3,4,5,8]\d[\s,-]?\d{4}[\s,-]?\d{4}' 使用数组语法可以解决: [ ...
随机推荐
- jQuery实现的浮动层div浏览器居中显示效果
本文实例讲述了jQuery实现的浮动层div浏览器居中显示效果.分享给大家供大家参考,具体如下: 1.在页面的head中引入jQuery <script type="text/java ...
- MSDN--ASP.NET概述
https://msdn.microsoft.com/zh-cn/library/4w3ex9c2(v=vs.100).aspx
- AndroidManifest.xml文件详解(activity)(三)四种工作模式
android:launchMode 这个属性定义了应该如何启动Activity的一个指令.有四种工作模式会跟Intent对象中的Activity标记(FLAG_ACTIVITY_*常量)结合在一起用 ...
- Java Base64解析
最近在业务场景中,需要对第三方传递进来的字符进行base64解密,根据第三方文档提供的解析工具,对数据进行了解析,关于Base64的解析方式如下: String sign = "xxxxxx ...
- 编写高质量代码--改善python程序的建议(七)
原文发表在我的博客主页,转载请注明出处! 建议三十四:掌握字符串的基本用法 编程有两件事,一件是处理数值,另一件是处理字符串,在商业应用编程来说,处理字符串的代码超过八成,所以需要重点掌握. 首先有个 ...
- dubbo 序列化 问题 属性值 丢失 ArrayList 解决
参考文章:http://blog.csdn.net/wanyanxgf/article/details/6944733 http://tianya23.blog.51cto.com/1081650/5 ...
- windows平台 - 0基础学习node.js(一)
首先得明白node.js做什么用的: 简单的说 Node.js 就是运行在服务端的 JavaScript. Node.js 是一个基于Chrome JavaScript 运行时建立的一个平台. Nod ...
- MD5-【验签】
MD5是什么? MD5是message-digest algorithm 5(信息-摘要算法)的缩写,被广泛用于加密和解密技术上,它可以说是文件的"数字指纹".任何一个文件,无论是 ...
- 你不知道的Javascript(上卷)读书笔记之四 ---- 提升、this
1. 提升 使用var声明的变量声明和函数的声明(函数表达式不会)会被提升至所在函数作用域顶部 a. 从编译器角度出发 回忆一下, 中关于编译器的内容,引擎会在解释 JavaScript 代码之前首先 ...
- JS全选checkbox
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/ ...