[[email protected] ~]# yum install ntp
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. http://mirrors.163.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn‘t help to resolve this issue please create a bug on https://bugs.centos.org/
One of the configured repositories failed (CentOS-$releasever - Base - 163.com),
and yum doesn‘t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Disable the repository, so yum won‘t use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:
yum-config-manager --disable base
4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=base.skip_if_unavailable=true
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.163.com/centos/$releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Meet the above problem, reprint a solution: http://www.linuxidc.com/Linux/2013-10/90932.htm
=====================================================================================================
Today's online search for a lot of RHEL6.4 to the CentOS source of the article, all follow the step by step to operate, but are not. Later, I synthesized each article, revision change, and finally successfully changed the Yum source.
First step: Delete the default yum source. The command is as follows
Rpm-aq | grep Yum|xargs Rpm-e--nodeps
Step two: Download the latest yum install package
wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.4/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
Step three: Install Yum related software.
RPM-IVH python-iniparse-0.3.1-2.1.el6.noarch.rpm
RPM-IVH yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
RPM-IVH yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
Fourth step: Change the Yum source, we use the image source NetEase, you can go here http://mirrors.163.com/.help/centos.html download the latest Centos-base.repo file, and then CP to/etc/ yum.repos.d/directory, modify the file inside the $releasever all replaced with the version number, that is, 6 last saved. Finally, the file is named Rhel-source.repo, replacing the file with the same name as the original directory.
Fifth step: Clean up the Yum cache
Yum Clean All
Yum Makecache
Finally shown below, the replacement of Yum Source was successful.
Loaded Plugins:fastestmirror, Product-id, Subscription-manager
This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.
Determining fastest Mirrors
Base | 3.7 KB 00:00
Base/group_gz | 212 KB 00:00
base/filelists_db | 5.9 MB 00:12
base/primary_db | 4.4 MB 00:09
base/other_db | 2.7 MB 00:05
Extras | 3.4 KB 00:00
extras/filelists_db | Ten KB 00:00
Extras/prestodelta | 905 B 00:00
extras/primary_db | KB 00:00
extras/other_db | 5.7 KB 00:00
Updates | 3.4 KB 00:00
updates/filelists_db | 4.0 MB 00:08
Updates/prestodelta | 978 KB 00:02
updates/primary_db | 4.4 MB 00:09
updates/other_db | 661 KB 00:01
REDHAT7 (CENTOS7) not registered to Red Hat Subscription Management