Failed connect to mirrors.cloud.aliyuncs.com:80


在yum insatall 安装是报错
Failed connect to mirrors.cloud.aliyuncs.com:80; Connection refused

解决方法:

cd /etc/yum.repos.d/

[root@web /etc/yum.repos.d]# sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-Base.repo
3)
[root@web /etc/yum.repos.d]# cat CentOS-Base.repo

CentOS-Base.repo

[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

released updates

[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

additional packages that may be useful

[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

additional packages that extend functionality of existing packages

[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

contrib - packages by Centos Users

[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
You have new mail in /var/spool/mail/root

运行 yum clean all
yum makecache
[root@web /etc/yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base epel extras remi-safe updates
Cleaning up list of fastest mirrors
[root@web /etc/yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • remi-safe: mirror.innosol.asia
  • updates: mirrors.aliyun.com
    base | 3.6 kB 00:00:00
    epel | 4.7 kB 00:00:00
    extras | 2.9 kB 00:00:00
    remi-safe | 3.0 kB 00:00:00
    updates | 2.9 kB 00:00:00
    (1/19): base/7/x86_64/group_gz | 153 kB 00:00:00
    (2/19): base/7/x86_64/filelists_db | 7.1 MB 00:00:02
    (3/19): epel/x86_64/group_gz | 95 kB 00:00:00
    (4/19): base/7/x86_64/other_db | 2.6 MB 00:00:01
    (5/19): base/7/x86_64/primary_db | 6.1 MB 00:00:04
    (6/19): epel/x86_64/filelists_db | 12 MB 00:00:04
    (7/19): epel/x86_64/prestodelta | 542 B 00:00:00
    (8/19): epel/x86_64/primary_db | 6.9 MB 00:00:01
    (9/19): extras/7/x86_64/primary_db | 206 kB 00:00:00
    (10/19): epel/x86_64/other_db | 3.3 MB 00:00:00
    (11/19): extras/7/x86_64/other_db | 124 kB 00:00:00
    (12/19): extras/7/x86_64/filelists_db | 217 kB 00:00:01
    (13/19): updates/7/x86_64/filelists_db | 2.4 MB 00:00:00
    (14/19): updates/7/x86_64/primary_db | 4.5 MB 00:00:01
    (15/19): updates/7/x86_64/other_db | 318 kB 00:00:00
    (16/19): remi-safe/primary_db | 1.8 MB 00:00:03
    (17/19): remi-safe/other_db | 487 kB 00:00:03
    (18/19): remi-safe/filelists_db | 1.4 MB 00:00:04
    (19/19): epel/x86_64/updateinfo | 1.0 MB 00:00:15
    Metadata Cache Created


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM