一、故障现象:
在安装了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. Zookeeper Watcher接口

    在ZooKeeper中,接口类Watcher用于表示一个标准的事件处理器,其定义了事件通知相关的逻辑,包含KeeperState和EventType两个枚举类,分别代表了通知状态和事件类型,同时定义了 ...

  2. HDU 1520 Anniversity party

    There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The Un ...

  3. DENEBOLA (See3CAM_CX3RDK) - CX3 Reference Design

    Denebola (See3CAM_CX3RDK) is a USB3.0 USB video class (UVC) reference design kit (RDK) developed by ...

  4. 【Vuejs】269- 提升90%加载速度——vuecli下的首屏性能优化

    前言 之前用 ,所以接下来还会介绍一些它们在优化上的异同 分析 vuecli 2.x自带了分析工具只要运行 npm run build --report 如果是 vuecli 3的话,先安装插件 cn ...

  5. Web基础了解版02-JavaScript

    JavaScript 特性 ① 解释型语言.JavaScript是一种解释型的脚本语言,JavaScript是在程序的运行过程中逐行进行解释,不需要被编译为机器码再执行. ② 面向对象.JavaScr ...

  6. 【UIBE】研究生考试前必看

      梦想就在前方,再跨一步就能到达.考研的同学们,请务必加油! 回想4年前的今天,坐在图书馆里的我,紧张于即将来临的考试,期待于每天憧憬的未来.大半年的复习生活,我学会了很多,学会了早起抢座位:学会了 ...

  7. selenium滑块操作

    from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from ...

  8. Django 之day02,必会知识点

    静态文件配置******* 为什么用户在浏览器中输入的网址能够访问到对应的资源, 前提是后端提前开设该资源的访问,在urls.py文件中进行配置该路由, 如果我的后端没有开设相关的资源,用户是无法访问 ...

  9. LeetCode529. 扫雷游戏 Python3 DFS+BFS+注释

    https://leetcode-cn.com/problems/minesweeper/solution/python3-dfsbfszhu-shi-by-xxd630/ 规则: 'M' 代表一个未 ...

  10. [ASP.NET Core 3框架揭秘] 配置[6]:多样化的配置源[上篇]

    .NET Core采用的这个全新的配置模型的一个主要的特点就是对多种不同配置源的支持.我们可以将内存变量.命令行参数.环境变量和物理文件作为原始配置数据的来源.如果采用物理文件作为配置源,我们可以选择 ...