When redhat7 yum installs software, it prompts This system is not registered with RHN. Solution

When I use redhat7's yum command to install software, I always find that this system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Or the following error message: This system is not registered with RHN. RHN support will be disabled. It turns out that the yum service of RHEL7 is paid. Because there is no payment, you cannot use yum to install the software. You can only replace it with the yum tool of CentOs. The following are the specific operation steps.

-- View yum
rpm -qa |grep yum --Uninstall

yum
rpm -qa | grep yum | xargs rpm -e --nodeps --Copy

the centos system yum tool installer to
yum-3.4.3-132 in the specified directory of linux. el7.centos.0.1.noarch.rpm
yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm
yum-updateonboot-1.1.31-34.el7.noarch.rpm
yum-utils-1.1.31-34 .el7.noarch.rpm
yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
installation program see attachment

--install yum package
rpm -ivh yum-*
--Import key (I can't remember whether it is needed or not)
rpm --import public.gpg.key
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* --Open

source software image in Alibaba Cloud The site downloads the resource file, the target address is /etc/yum.repos.d/CentOS-Base.repo (overwrite)
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun .com/repo/Centos-7.repo

-- Replace the $releasever variable of the CentOS-Base.repo file with the relevant linux version, here you can replace it with "7", the specific operation:
vi /etc/yum.repos.d/ CentOS-Base.repo
:%s/$releasever/7/ge
:wq

Using yum to download and install the software is ok, the following prompt has started to download the software from the Alibaba Cloud mirror server.
# yum install -y telnet
Plugins loaded: fastestmirror, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
base                                                                                                                                                                    | 3.6 kB  00:00:00    
extras                                                                                                                                                                  | 3.4 kB  00:00:00    
updates                                                                                                                                                                 | 3.4 kB  00:00:00    
(1/4): base/x86_64/group_gz                                                                                                                                             | 155 kB  00:00:00    
(2/4): extras/x86_64/primary_db                                                                                                                                         | 101 kB  00:00:00    
(3/4): updates/x86_64/primary_db                                                                                                                                        | 3.1 MB  00:00:02    
base/x86_64/primary_db         FAILED                                         
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/c6411f1cc8a000ed2b651b49134631d279abba1ec1f78e5dcca79a52d8c1eada-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
正在尝试其它镜像。
(4/4): base/x86_64/primary_db | 5.3 MB 00:00:03    
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
is resolving dependencies
--> Checking transactions
---> Package telnet.x86_64.1.0.17-59.el7 will be installed
--> Resolving dependencies done Resolving

dependencies

============= ===================================================== ===================================================== ===================================================== =============================
Package Architecture Version Source Size
============================================= ===================================================== ===================================================== ===============================================
Installing:
telnet x86_64 1:0.17-59.el7 base 63k

transaction summary
======================================= ===================================================== ===================================================== ===================================================== ====
Install 1 package

Total downloads: 63k
Install size: 113k

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326707733&siteId=291194637