码迷,mamicode.com
首页 > 其他好文 > 详细

RedHat7.5 针对This system is not registered with an entitlement server问题,更换yum源

时间:2020-04-01 12:57:10      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:enable   test   isa   解决   ext   文件   mirrors   oar   boot   

1、报错现象如下:
[root@cdh02 ~]# yum install httpd
已加载插件:langpacks, 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>

 技术图片

原因是RHEL是收费的,需要注册才可正常使用。解决办法是用CentOS的yum源替换掉原yum源,CentOS已经被红帽收购,且跟RHEL系统没多大区别,可以免费使用

2、查看Redhat的原yum源

技术图片

3、进行卸载

技术图片

4、确定本机可以上网

技术图片

5、确保http://mirrors.163.com/centos/可以访问,找到自己所需版本进行下载
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-chardet-2.2.1-3.el7_1.noarch.rpm
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/yum-3.4.3-163.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-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-52.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-52.el7.noarch.rpm

技术图片

如果需要可以拷贝到所需地址:[root@cdh02 ~]# scp -r /home/software/yum root@cdh03:/home/software/

6、安装软件包
[root@cdh02 yum]# rpm -ivh python-*
[root@cdh02 yum]# rpm -ivh yum-*

7、新建repo配置文件,如果是其他Relhat版本,将7改为对应的版本数字
[root@cdh02 yum.repos.d]# vim /etc/yum.repos.d/CenOS-Base.repo
#CentOS-Base.repo
[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

8、清除缓存 [root@cdh02 ~]# yum clean all
9、验证是否ok [root@cdh02 ~]# yum install -y httpd

技术图片

 

 

RedHat7.5 针对This system is not registered with an entitlement server问题,更换yum源

标签:enable   test   isa   解决   ext   文件   mirrors   oar   boot   

原文地址:https://www.cnblogs.com/zzvb/p/12611510.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!