错误信息

[root@bogon apache-tomcat-7.0.]# yum install gcc-c++
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@bogon apache-tomcat-7.0.]# rpm -qa | grep yum
yum-rhn-plugin-2.0.-.el7.noarch
yum-metadata-parser-1.1.-.el7.x86_64
yum-3.4.-.el7.noarch

2、卸载这些软件包

[root@bogon apache-tomcat-7.0.]# rpm -e yum-rhn-plugin-2.0.-.el7.noarch --nodeps
[root@bogon apache-tomcat-7.0.]# rpm -e yum-metadata-parser-1.1.-.el7.x86_64 --nodeps
[root@bogon apache-tomcat-7.0.]# rpm -e yum-3.4.-.el7.noarch --nodeps

3、保证本机电脑能上网

[root@bogon apache-tomcat-7.0.]# ping www.baidu.com
PING www.a.shifen.com (61.135.169.121) () bytes of data.
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=5.17 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=4.52 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=5.69 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=3.33 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=5.57 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=5.18 ms

4、找到自己所需要的版本下载

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-chardet-2.2.1-1.el7_1.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-45.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-45.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm

5、安装软件包

rpm -ivh python-*

rpm -ivh yum-*

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

7、清除缓存

yum clean all

8、测试是否正常

yum -y install lftp

参考网址:

https://www.linuxidc.com/Linux/2017-04/142444.htm

http://qingfengjushi1.iteye.com/blog/2282986(这个链接地址里面有已经下载好的rpm)

https://www.cnblogs.com/horizonli/p/5507112.html

This system is not registered with an entitlement server. You can use subscription-manager to register.的更多相关文章

  1. Red Hat Enterprise 7.5 安装后无法进入图形界面 This system is not registered with an entitlement server. You can use subscription-manager to register.

    This system is not registered with an entitlement server. You can use subscription-manager to regist ...

  2. Cockpit subscriptions on CentOS 7 - This system is not registered with an entitlement server. You can use subscription-manager to register.

    下午安装 cockpit 时,使用 yum 工具的时候哦,出现如下信息: This system is not registered with an entitlement server. You c ...

  3. yum提示This system is not registered with RHN.RHN support will be disabled.

    [root@cactiez ~]# yum install mlocateLoading "security" pluginLoading "rhnplugin" ...

  4. This system is not registered with RHN

    在红帽EL5上运行yum,提示“This system is not registered with RHN”,意思是没有在官网上注册,不能下载RH的软件包,替代方案是采用centos源. 1.卸载r ...

  5. This system is not registered with RHN解决方法

    root@localhost ipvsadm-1.25]# yum install gcc Loading "security" plugin Loading "rhnp ...

  6. 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 ...

  7. Red Hat Enterprise Linux Server(RHEL) yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法(转)

    新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription M ...

  8. 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 ...

  9. 使用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 ...

随机推荐

  1. 剑指offer例题——跳台阶、变态跳台阶

    题目:一只青蛙一次可以跳上1级台阶,也可以跳上2级.求该青蛙跳上一个n级的台阶总共有多少种跳法(先后次序不同算不同的结果). 思路: n<=0时,有0种跳法 n=1时,只有一种跳法 n=2时,有 ...

  2. [CI]CodeIgniter系统流程

    ---------------------------------------------------------------------------------------------------- ...

  3. 多线程数据库查询(ADO)

    ADO多线程数据库查询通常会出现3个问题: 1.CoInitialize 没有调用(CoInitialize was not called):所以,在使用任何dbGo对象前,必须手 调用CoIniti ...

  4. javaweb 学习系列【转】

    http://www.cnblogs.com/xdp-gacl/category/574705.html jsp指令 http://www.cnblogs.com/huiyuantang/p/5332 ...

  5. Angular2 web project UltraRacing (一,如何启动一个Angular项目?)

    要稍等一会 切到目录看看 OK,生成很多文件 那么 我们来启动吧 出现下面信息说明成功 而且每次我们编译文件后 都会在cmd里面显示这个信息 说明他是热部署的 然后我们去浏览器看看 说明一切OK!

  6. app与jvm 反向代理时config的设置(用于在web页面显示npm(就如tomcat)产生的页面)

    dev: { // Various Dev Server settings contentBase: ROOT, host: ip, port: 8084,    //此端口为任意设置,不重复即可,为 ...

  7. C++ vc中怎么使用SendMessage自定义消息函数

    vc中怎么使用SendMessage自定义消息函数: SendMessage的基本结构如下:SendMessage(    HWND hWnd,  //消息传递的目标窗口或线程的句柄.    UINT ...

  8. hdu2669-Romantic-(扩展欧几里得定理)

    Romantic Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Su ...

  9. 内核 platform_get_resource() 函数解析

    struct resource *platform_get_resource(struct platform_device *dev,            unsigned int type, un ...

  10. linux安装memcached和php的memcache扩展 (已使用)

    所需软件libevent-1.4.6-stable.tar.gz (http://monkey.org/~provos/libevent/)memcache-2.2.3.tgz (http://pec ...