执行yum install yum-utils的时候出现下面报错
[]root@cdh02 ~ 20:50:41]# yum install yum-uitls -y
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 11 kB 00:00:00
* base: mirrors.aliyun.com
* epel: mirrors.ustc.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
http://cdh01/cm6/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to cdh01:80; 拒绝连接"
正在尝试其它镜像。
http://cdh01/cm6/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to cdh01:80; 拒绝连接"
正在尝试其它镜像。
查看镜像仓库,发现一个神奇的cm.repo文件
[user@cdh01 ~]$ cd /etc/yum.repos.d/
[user@cdh01 yum.repos.d]$ ls
CentOS-Base.repo CentOS-Media.repo epel.repo
CentOS-Base.repo.backup CentOS-Sources.repo epel-testing.repo
CentOS-CR.repo CentOS-Vault.repo kubernetes.repo
CentOS-Debuginfo.repo CentOS-x86_64-kernel.repo redhat.repo
CentOS-fasttrack.repo cm.repo
打开该文件,发现仓库配置指向一个内部服务器 cdh01
的地址
[CM]
name=cm6
baseurl=http://cdh01/cm6/
gpgcheck=0
删掉这个repo,即可从正确的仓库下载