转载请注明出处:https://www.cnblogs.com/kelamoyujuzhen/p/9087725.html 

这类问题归根到底就是软件源问题,Linux下安装软件不像windows。Linux软件管理知识参考:https://www.cnblogs.com/kelamoyujuzhen/category/1283689.html

问题描述

RedHat Enterprise Linux 6.4,64位。使用yum命令安装软件时候出现以下错误:

This system is not registered to Red Hat Subscription Management.You can use subscription-manager to register.

原因

使用redhat的yum源是需要注册付费的。

解决办法

卸载原有yum包,替换centos 6.4的yum包

卸载yum包

rpm -aq|grep yum|xargs rpm -e --nodeps

下载centos6.4的yum包,下载路径http://vault.centos.org/6.4/os/x86_64/Packages/

依次执行

rpm -ivh yum-metadata-parser-1.1.-.el6.x86_64.rpm
rpm -ivh yum-3.2.-.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.-.el6.noarch.rpm python-urlgrabber-3.9.-.el6.noarch.rpm

更换yum源,使用163的源

打开http://mirrors.163.com/.help/centos.html,在里面下载对应版本的repo文件,比如我下载的是CentOS6-Base-163.repo文件,然后把它放到/etc/yum.repos.d/下。还需要打开CentOS6-Base-163.repo文件修改$releasever为版本号6。

# 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- - Base - .com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #released updates
[updates]
name=CentOS- - Updates - .com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful
[extras]
name=CentOS- - Extras - .com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS- - Plus - .com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=
enabled=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users
[contrib]
name=CentOS- - Contrib - .com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=
enabled=
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

清除原有缓存

使用命令 yum clean all 清除原来的缓存。

重新建立缓存

使用命令 yum makecache 重建缓存。

测试安装一个man,成功

yum install man -y

下面介绍方法二:

将ISO插入到虚拟机光驱

在/mnt下面创建目录cdrom,权限默认的就行。

将虚拟机光驱里面的光盘挂载到刚刚创建的目录

mount /dev/cdrom /mnt/cdrom/

查看挂载后的文件

[root@51cto mnt]# ll /mnt/cdrom/
total
dr-xr-xr-x. root root Jan EFI
lr-xr-xr-x. root root Jan EULA -> EULA_en
-r--r--r--. root root Nov EULA_de
-r--r--r--. root root Nov EULA_en
-r--r--r--. root root Nov EULA_es
-r--r--r--. root root Nov EULA_fr
-r--r--r--. root root Nov EULA_it
-r--r--r--. root root Nov EULA_ja
-r--r--r--. root root Nov EULA_ko
-r--r--r--. root root Nov EULA_pt
-r--r--r--. root root Nov EULA_zh
-r--r--r--. root root Jun GPL
dr-xr-xr-x. root root Jan HighAvailability
dr-xr-xr-x. root root Jan images
dr-xr-xr-x. root root Jan isolinux
dr-xr-xr-x. root root Jan LoadBalancer
-r--r--r--. root root Jan media.repo
dr-xr-xr-x. root root Jan Packages
-r--r--r--. root root Sep README
-r--r--r--. root root Jan RELEASE-NOTES-as-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-bn-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-de-DE.html
-r--r--r--. root root Jan RELEASE-NOTES-en-US.html
-r--r--r--. root root Jan RELEASE-NOTES-es-ES.html
-r--r--r--. root root Jan RELEASE-NOTES-fr-FR.html
-r--r--r--. root root Jan RELEASE-NOTES-gu-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-hi-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-it-IT.html
-r--r--r--. root root Jan RELEASE-NOTES-ja-JP.html
-r--r--r--. root root Jan RELEASE-NOTES-kn-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-ko-KR.html
-r--r--r--. root root Jan RELEASE-NOTES-ml-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-mr-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-or-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-pa-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-pt-BR.html
-r--r--r--. root root Jan RELEASE-NOTES-ru-RU.html
-r--r--r--. root root May RELEASE-NOTES-si-LK.html
-r--r--r--. root root Jan RELEASE-NOTES-ta-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-te-IN.html
-r--r--r--. root root Jan RELEASE-NOTES-zh-CN.html
-r--r--r--. root root Jan RELEASE-NOTES-zh-TW.html
dr-xr-xr-x. root root Jan repodata
dr-xr-xr-x. root root Jan ResilientStorage
-r--r--r--. root root Jan RPM-GPG-KEY-redhat-beta
-r--r--r--. root root Jan RPM-GPG-KEY-redhat-release
dr-xr-xr-x. root root Jan ScalableFileSystem
dr-xr-xr-x. root root Jan Server
-r--r--r--. root root Jan TRANS.TBL

以安装traceroute为例

在/mnt/cdrom/Packages目录下搜索

[root@51cto Packages]# pwd
/mnt/cdrom/Packages
[root@51cto Packages]# find -name "*traceroute*"
./traceroute-2.0.-.el6.x86_64.rpm

找到traceroute对应的rpm包

[root@51cto Packages]# rpm -i traceroute-2.0.-.el6.x86_64.rpm
warning: traceroute-2.0.-.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY

现在traceroute命令就可以使用了


下面介绍方法三:

与方法一类似,只不过不是替换yum元配置文件而是修改yum源配置文件。Redhat最小化安装后/etc/yum.repos.d目录下默认配置文件rhel-source.repo。这里面指向的都是Redhat的yum源站点,我们可以指向本地。先把/dev/cdrom挂载到/mnt/cdrom

然后rhel-source.repo文件中加上几句话

[rhel-source-local]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=file:///mnt/cdrom/Server
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

enabled=1 表示启用yum源

gpgcheck=1 检查数字签名,需要Redhat的公钥

gpgkey=XXXX  指定公钥位置

【问题】This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.的更多相关文章

  1. red-hat6.5 yum 源配置,cloud-init 安装 This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register

    This system is not registered to Red Hat Subscription Management. You can use subscription-manager t ...

  2. RedHat Enterprise Linux 6.4使用yum安装出现This system is not registered to Red Hat Subscription Management

    我虚拟机安装的系统是RedHat Enterprise Linux 6.4-i686,是32位的.使用yum命令安装软件时候出现以下错误: This system is not registered ...

  3. 使用yum时报错 This system is not registered to Red Hat Subscription Management

    错误原因:使用redhat的yum源是需要注册付费的. 1.卸载RedHat自带的yum包 查看已安装的yum rpm -qa|grep yum #卸载已安装的yum rpm -qa | grep y ...

  4. rhel7.0解决:This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

    看这篇文章前,先说一下我的实际情况.本来要部署docker服务的,然后yum安装任何软件都不起效果,最后通过老师远程的帮助,最后成功安装上docker,老师的解决办法就是忽略这个问题,直接自己配置网络 ...

  5. Posts Tagged ‘This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register问题的解决办法

    HowTo Install redhat package with YUM command without RHN February 26, 2014 in Redhat / Linux Tips a ...

  6. red hat 6.5 红帽企业Linux.6.5 yum This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 解决办法

    1.删除redhat原有的yum rpm -aq|grep yum|xargs rpm -e --nodeps 2.下载yum安装文件 wget http://mirrors.163.com/cent ...

  7. [转]redhat7(centos7) not registered to Red Hat Subscription Management

    [root@controller0 ~]# yum install ntp Loaded plugins: fastestmirror, product-id, search-disabled-rep ...

  8. How to delete System Profiles for those registered with Red Hat Subscription Management (RHSM)?

    Environment Red Hat Customer Portal Certificate Based Subscription Red Hat Subscription Management ( ...

  9. This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.

    Wrong date and time, reset the date and time in the system properly. It may also happen that system ...

随机推荐

  1. MYSQL 启动问题

    1.日志中出现  [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different si ...

  2. 【Leetcode_easy】628. Maximum Product of Three Numbers

    problem 628. Maximum Product of Three Numbers 题意:三个数乘积的最大值: solution1: 如果全是负数,三个负数相乘还是负数,为了让负数最大,那么其 ...

  3. linux系统时间设定

    更改系统时间并同步硬件时钟 sudo date -s '2018-12-27 12:46' sudo hwclock --systohc hwclock说明:hwclock --help

  4. Ubuntu构建LVS+Keepalived高可用负载均衡集群【生产环境部署】

    1.环境说明: 系统版本:Ubuntu 14.04 LVS1物理IP:14.17.64.2   初始接管VIP:14.17.64.13 LVS2物理IP:14.17.64.3   初始接管VIP:14 ...

  5. 导航current背景

    ========================================简单一点的 var locationUrl = location.href.toLowerCase(); //导航cur ...

  6. nginx check健康检查

    nginx利用第三方模块nginx_upstream_check_module来检查后端服务器的健康情况 大家都知道,前段nginx做反代,如果后端服务器宕掉的话,nginx是不能把这台realser ...

  7. nginx location 优先级

    location 顺序/优先级:     location = > location 完整路径 > location ^~ 路径 > location ~,~* 正则顺序 > ...

  8. ubuntu的sudo免密

    ubuntu的sudo免密与centos大同小异,都是在/etc/sudoers中添加用户信息,添加的内容也一样,只是位置不一样. centos的位置如下: 而ubuntu的位置如下: 除此之外,两行 ...

  9. 在airflow的BashOperator中执行docker容器中的脚本容易忽略的问题

    dag模板 from airflow import DAG from airflow.operators.bash_operator import BashOperator from airflow. ...

  10. [转帖]Linux 中的零拷贝技术,第 2 部分

    Linux 中的零拷贝技术,第 2 部分 https://www.ibm.com/developerworks/cn/linux/l-cn-zerocopy2/index.html   Linux 中 ...