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时提示需要注册问题解决方案的更多相关文章

  1. linux虚拟机 在install yum时提示无法获得锁 var/lib/dekg/lock时该如何解决?

    起因 在新虚拟机中使用yum命令时提示要安装,安装过程中提示出错. 问题 在sudo apt install yum时提示下列错误该如何解决? E: 无法获得锁 /var/lib/dpkg/lock ...

  2. 首次使用windows管理界面访问安装在UNIX或linux下的DP服务器时提示无权限访问的解决方法

    用windwos GUI管理界面连接时提示无权限访问: 在/etc/opt/omni/server/users/userlist 添加一行: "" "*" &q ...

  3. 转载:Linux下执行SVN命令时提示错误:Valid UTF-8 data

    在Linux下执行svn add *时出现如下错误: svn:  Valid UTF-8  data(hex: 4b)followed by invalid UTF-8 sequence(hex:  ...

  4. Linux tar命令解压时提示时间戳异常的处理办法

    在Linux服务器上的文件会有3个时间戳信息 访问时间(Access).修改时间(Modify).改变时间(Change),都是存放在该文件的Inode里面 问题描述: 公司网站是前后端分离的,所有的 ...

  5. 在linux上使用impdp命令时提示ORA-12154: TNS:could not resolve the connect identifier specified的问题

    今天在一台linux服务器上用impdp命令导入dmp文件时出现了错误: ORA: TNS:could not resolve the connect identifier specified 我使用 ...

  6. Linux cp一个文件夹时提示cp: omitting directory `test/'

    将一个文件夹test 复制到地址/opt/tmp下,提示出错: cp: omitting directory `test/' 原因: test 目录下还有目录,不能直接进行拷贝. 我们先找下cp 的命 ...

  7. linux服务器git pull/push时提示输入账号密码之免除设置

    1.先cd到根目录,执行git config --global credential.helper store命令 [root@iZ25mi9h7ayZ ~]# git config --global ...

  8. 【转】卸载VMware时提示“The MSI failed”解决方案

    转载地址: http://www.2cto.com/os/201309/243843.html   安装精简版VM后再安装其他版本的VM,或者想升级安装更高的版本时,无法正常卸载(如提示The MSI ...

  9. ThinkPHP5 正则验证中有“|”时提示“规则错误”的解决方案

    正则规则中有“|”时,会引起解析错误: 'regex:\d{3,4}[\s,-]?\d{7,8}|1[3,4,5,8]\d[\s,-]?\d{4}[\s,-]?\d{4}' 使用数组语法可以解决: [ ...

随机推荐

  1. ubuntu 用命令行设置chrome的proxy

    google-chrome-stable --proxy-server="IP proxy Server:port"

  2. bootstrap随笔点击增加

          ht5:   <div class="form-group"><label class="col-sm-2 control-label&qu ...

  3. 【SR】MAP

    MAP:最大后验概率(Maximum a posteriori) 估计方法根据经验数据获得对难以观察的量的点估计.它与最大似然估计中的 Fisher方法有密切关系, 但是它使用了一个增大的优化目标,这 ...

  4. grid++report中篇

    QQ:1187362408 欢迎技术交流和学习 grid++report中篇(grid++report): TODO: 1.grid++report:简单介绍( Grid++Report 是一款高性能 ...

  5. iOS开发之 -- 判断tableview/scrollview的滑动方法,及导航栏渐变的实现代码

    开发的过程中,肯定会用到在视图想上滑动的时候,在导航处做一些操作,比如向上滑动的时候,做个动画,出现一个搜索框,或者其他的操作,那么我们怎么来判断它的滑动方向呢? 首先我们应该知道tableview继 ...

  6. Java读取、创建Excel;验签,加密

    需要架包:poi相关jar,Md5.jar------------------------------------------------------------------------------- ...

  7. ZOJ 1648 Circuit Board(计算几何)

    Circuit Board Time Limit: 2 Seconds Memory Limit: 65536 KB On the circuit board, there are lots of c ...

  8. 巨蟒python全栈开发数据库前端5:JavaScript1

    1.js介绍&变量&基础数据类型 2.类型查询&运算符&if判断&for循环 3.while循环&三元运算符 4.函数 5.今日总结 1.js介绍&am ...

  9. php 正则表达式三.模式修正

    1.贪婪模式和懒惰模式, 贪婪模式:php中正则默认是贪婪模式,匹配尽可能多 的字符,比如 $pattern='/a+b/'; $subject='aaaaaaaaab,那么可能会preg_match ...

  10. pug.compile() will compile the Pug source code into a JavaScript function that takes a data object (called “locals”) as an argument.

    Getting Started – Pug https://pugjs.org/api/getting-started.html GitHub - Tencent/wepy: 小程序组件化开发框架 h ...