If the following error occurs, it means you need to reinstall yum:
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There are no enabled sources.
Execute "yum repolist all" to see the sources you own.
You can use yum-config-manager --enable to enable the source
1.Check if it is installedyumbag. Check if RHELis installedyum, if it is installed, then what are there yumPackage:
#rpm -qa |grep yum
2 Deleteredhatcomes withyumPackage
# rpm -qa|grep yum|xargs rpm -e --nodeps (do not check dependencies, directly delete the rpm package)
#rpm -qa |grep yum (check confirmation)
3、Gohttp://mirrors.163.com/centos/7/os/x86_64/Packages/download the following file< /p>
8, modify the source file (1 ) Enter the systemyumThe source directory: p>
#cd /etc/yum.repos.d
(2) downloadyum span>Source: Enter:http://mirrors.163 .com/.help/centos.htmlthere is a downloadable versionrepo< span style="font-family: 宋体;">File, Put in/etc/yum.repos.d/(Please make corresponding backup before operation)
(3) Modify CentOS6-Base-163.repo file< br>
vi CentOS6-Base-163.repo
# 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=$releasever&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=$releasever&arch=$basearch&repo=updates
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 may be useful
[extras]
name=CentOS-7-Extras-163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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
"CentOS7-Base-163.repo" 41L, 1491C
9, Importkey
rpm --import RPM-GPG-KEY-CentOS-7
10, runmakecache to generate cache
yum makecache
11, run yum clean all (equivalent to yum cleanheaders; yum cleanpackages) ;
yum clean all
12, updateYUM file
yum update
< /div>
13, whether the installation was successful yum install dhcp -y prompt to install, that means it’s fine.
The above content refers to the blogger: https://blog.csdn.net/chensongmol/article/details/84797453 The article, I wrote this blog mainly for the convenience of later viewing by myself
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There are no enabled sources.
Execute "yum repolist all" to see the sources you own.
You can use yum-config-manager --enable to enable the source
#rpm -qa |grep yum
#rpm -qa|grep yum|xargs rpm -e --nodeps (do not check dependencies, delete rpm directly Bag)
#rpm -qa |grep yum (check confirmation)
# 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=$releasever&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=$releasever&arch=$basearch&repo=updates
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 may be useful
[extras]
name=CentOS-7-Extras-163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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
"CentOS7-Base-163.repo" 41L, 1491C
rpm --import RPM-GPG- KEY-CentOS-7
yum makecache
yum clean all
yum update
WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist] SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5115 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC