一、故障现象:
在安装了Read linux后,使用yum安装软件,出现如下提示:
[root@localhost~]# yum install xxx
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable <repo>
To enable custom repositories:
yum-config-manager --enable <repo>
二、解决办法:
1、查看redhat 7.0系统本身所安装的那些yum软件包
[root@localhost~]# rpm -qa | grep yum
yum-rhn-plugin-2.0.1-10.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-3.4.3-158.el7.noarch
2、卸载这些软件包
[root@localhost~]# rpm -qa | grep yum | xargs rpm -e --nodeps
[root@localhost~]# rpm -e yum-rhn-plugin-2.0.1-10.el7.noarch --nodeps
[root@localhost~]# rpm -e yum-metadata-parser-1.1.4-10.el7.x86_64 --nodeps
[root@localhost~]# rpm -e yum-3.4.3-158.el7.noarch --nodeps
3、下载RPM包并上传到readlinux(请根据版本自行更换URL)
http://mirrors.163.com/centos/7/os/x86_64/Packages/
python-kitchen*,python-chardet*,yum-utils*,yum-metadata-parser*,yum-3.4.3-163.el7.centos.noarch.rpm yum-utils*,yum-updateonboot*,yum-plugin-fastestmirror*
4、安装软件包
rpm -ivh python-*
rpm -ivh yum-*
5、新建repo 配置文件(如果是其他版本,则将下面的7改为你当前的版本数字)
vim /etc/yum.repos.d/CentOS-Base.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-$7 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$7 - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$7 - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
6、测试一下就对了
yum clean all && yum makecache

**********如果难得执行上面的1-5步骤,直接的把每6步写好的RPO文件,放到/etc/yum.repos.d也能用**********

Redhat Linx使用Centos yum源的更多相关文章

  1. redhat linux使用Centos yum源

    redhat Linux如果是没有购买红帽许可的话是不能使用redhat的yum源的,但是可以通过修改使之能使用Centos的yum源. 步骤一:删除redhat的yum [root@localhos ...

  2. redhat centos yum源的安装

    redhat centos yum源的安装 1.除旧 #cd /etc/yum.repos.d #mv rhel-debuginfo.repo rhel-debuginfo.repo.bak 此处将其 ...

  3. RedHat 更新CentOS Yum源(转)

    经测试,可用.转自:https://www.cnblogs.com/tangsen/p/5151994.html 一.随笔引言 1.1随笔内容: 1.RedHat 配置Centos yum源 2.yu ...

  4. centos yum源配置 与yum配置文件

    参考博客 http://www.cnblogs.com/mchina/archive/2013/01/04/2842275.html 1.centos . yum配置文件在目录 /etc/yum.re ...

  5. RedHat 7.3 更新yum源

    title: RedHat 7.3 更新yum源 time: 2018.3.15 查看所有yum包 [root@bogon ~]# rpm -qa | grep yum yum-rhn-plugin- ...

  6. CentOS yum源设定使用方法的整理(转)

    CentOS yum更新了很多版本更新,我本人认为CentOS yum很好使的文件系统,在此向大家推荐CentOS应该是做为服务器的linux的佼佼者.CentOS采用的二进制包是rpm,不过包的依赖 ...

  7. 在VMware中为Redhat HAT配置本地yum源

    在VMware中为Redhat HAT配置本地yum源 今天准备使用CM安装大数据环境,到需要几台机器都使用同一套yum源才可以,所以想到将Redhat镜像文件拷贝到虚拟机中,在挂起使用,最后通过ht ...

  8. 【linux配置】在VMware中为Redhat HAT配置本地yum源

    在VMware中为Redhat HAT配置本地yum源 今天准备使用CM安装大数据环境,到需要几台机器都使用同一套yum源才可以,所以想到将Redhat镜像文件拷贝到虚拟机中,在挂起使用,最后通过ht ...

  9. RHEL6配置CentOS yum源

    RHEL6配置CentOS yum源

随机推荐

  1. python获取bing地图发布自己的TMS服务(一)下载瓦片

    部分结果 bing地图瓦片使用QuadKey作为命名方式. QuadKey简介 如何计算quadkey 在给定level下,把行号tileY和列号tileX转换为2进制,然后行列交叉存储,再转换为4进 ...

  2. VIP 视频开发板 上位机 测试软件 下载地址,玩转各自分辨率(V201抢先版)

    本上位机最高测试帧率 133fps 目前支持分辨率:更多分辨率支持,敬请期待或给我留言VGA:640*4801.3M:1280*10242M:1600*1200786p:1024*768 格式兼容:1 ...

  3. 开启mode="history"模式,需要服务端的支持,因为出现“刷新页面报错404”的问题;

    mode="history"是去除链接中的'#'的,但是加上后页面刷新回报404错误,怎么办呢? 解决办法:只需要在nginx中最末尾加上 try_files $uri $uri/ ...

  4. 04Shell流程控制

    流程控制 if 单分支结构 if 条件测试 then 命令序列 fi 双分支结构 if 条件测试 then 命令序列 else 命令序列 fi 多分支结构 if 条件测试 1 then 命令序列 [e ...

  5. textarea增加字数监听且高度自适应(兼容IE8)

    1.封装方法: var textareaListener = { /*事件监听器兼容 * *attachEvent——兼容:IE7.IE8:不兼容firefox.chrome.IE9.IE10.IE1 ...

  6. NodeJS2-5环境&调试----process(进程)

    argv(参数相关的) /* argv argv0 execArgv execPath */ const { argv, argv0, execArgv, execPath } = process; ...

  7. 《Java基础知识》流程控制

    流程控制分类: 一.顺序结构如果没有流程控制(即没有分支结构和循环结构),Java方法里面的语句是一个顺序执行流,从上到下依次执行每条语句. 二.分支结构1.if语句if语句使用布尔表达式或者布尔值作 ...

  8. 用js写一个鼠标坐标实例

    HTML代码 写一个div来作为鼠标区域 div中写一个span显示坐标信息 <body> <div id=""> <span></spa ...

  9. 手摸手教你编写你人生中第一个HTML页面

    本文是<HTML5与CSS3基础语法自学教程>的第二篇,首发于[前端课湛]微信公众号. 导读:本小节主要讲解 HTML 的基础语法内容,将通过编写第一个 HTML 页面来学习 HTML 的 ...

  10. JavaScript-作用域与作用域链

    一.JavaScript作用域:    1.就是代码名字(变量)在某个范围内起作用和效果,目的是为了提高程序的可靠性更重要是减少命名冲突. 2.js的作用域(es6)之前,分为全局作用域.局部作用域 ...