当前位置: 代码网 > 服务器>软件设计>开源 > 阿里云镜像库mirrors.aliyun.com无法访问Centos6源问题 以及 Docker安装官方Milvus2.0镜像太慢的解决

阿里云镜像库mirrors.aliyun.com无法访问Centos6源问题 以及 Docker安装官方Milvus2.0镜像太慢的解决

2024年07月31日 开源 我要评论
阿里云的开源镜像站地址: https://mirrors.aliyun.com/repo/ 在里面可以看到还有Centos-6.repo的repo包,但下载下来执行源更新会遇到问题后面的其它地址也一样会请求超时。mirrors.aliyun.com镜像中 http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml: 这些地址都无法访问。

一、阿里云镜像库mirrors.aliyun.com无法访问centos6源问题

    阿里云的开源镜像站地址: https://mirrors.aliyun.com/repo/ 在里面可以看到还有centos-6.repo的repo包,但下载下来执行源更新会遇到问题

后面的其它地址也一样会请求超时。

[root@04007 ~]# cat centos-6.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=1
gpgkey=http://mirrors.aliyun.com/centos/rpm-gpg-key-centos-6
 
#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=1
gpgkey=http://mirrors.aliyun.com/centos/rpm-gpg-key-centos-6
[root@04007 yum.repos.d]# yum makecache
loaded plugins: security
http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml: [errno 14] pycurl error 22 - "the requested url returned error: 404 not found"
trying other mirror.
to address this issue please refer to the below wiki article 
https://wiki.centos.org/yum-errors
if above article doesn't help to resolve this issue please use https://bugs.centos.org/.

http://mirrors.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [errno 14] pycurl error 22 - "the requested url returned error: 404 not found"
trying other mirror.
http://mirrors.cloud.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [errno 12] timeout on http://mirrors.cloud.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: (28, 'connection timed out after 3000 milliseconds')
trying other mirror.
error: cannot retrieve repository metadata (repomd.xml) for repository: base. please verify its path and try again

    mirrors.aliyun.com镜像中 http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml: 这些地址都无法访问。阿里云在centos镜像站(地址:https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b1133l0lm )中也提到centos6(centos6官方源已下线,建议切换centos-vault源)。

    因为centos在有新版本后就会结束对老版本的系统支持,因此对应的yum源也失效了,centos官方提供http://vault.centos.org/ 包含了所有发行的centos版本,因此需要将yum源修改为centos-vault的源。

    因此导致yum update报错,无法访问centos6源。可以将上面centos-6.repo文件中的 http://mirrors.aliyun.com/ 都换成https://vault.centos.org即可。包括baseurl和gpgkey这两行。如还会报错试着将$releasever替换为当前系统所使用的centos版本。

对比如下:

二、docker安装官方milvus2.0镜像太慢 

    在docker下安装milvus2.0的步骤并不多,官方文档地址:https://milvus.io/docs/v2.0.x/install_standalone-docker.md 先下载docker-compose.yml文件,然后设置docker_volume_directory的值执行docker-compose安装即可。但在执行下载镜像的时候太慢了。

root@testmc:~/# wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/docker/standalone/docker-compose.yml -o docker-compose.yml
root@testmc:~/# docker_volume_directory=/disk
root@testmc:~/# docker-compose up -d

    默认从docker远端镜像仓库中拉取镜像,真的是非常慢。有推荐使用国内daocloud镜像加速器,如下方法使用脚本将 --registry-mirror 加入到docker配置文件 /etc/docker/daemon.json中。但使用daocloud镜像地址依然很慢,下载个镜像半天不动,最后是用了阿里云 docker 加速拉取镜像(ubuntu)在下载etcd和minio的时候快很多,但在下载milvus依然还是很慢。

#使用国内daocloud镜像
root@testmc:~/# curl -ssl https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://d1d9aef0.m.daocloud.io
docker version >= 1.12
success.
#使用aliyuncs.com镜像
root@testmc:~/# sudo tee /etc/docker/daemon.json <<-'eof'
{
  "registry-mirrors": ["https://ijwtmjl5.mirror.aliyuncs.com"]
}
eof
sudo systemctl daemon-reload
sudo systemctl restart docker
root@testmc:~/# docker-compose up -d
starting milvus-etcd  ... done
starting milvus-minio ... done
starting milvus-standalone ... done
root@testmc:~/# docker-compose ps
root@testmc:~/# docker-compose down

    另外在直接使用下载下来的docker-compose.yml进行安装的时候会碰到一些报错和解决方法,如下:

#更新镜像源解决
error: error pulling image configuration: get https://production.cloudflare.docker.com  net/http: tls handshake timeout
error: the compose file './docker-compose.yml' is invalid because:
networks.default value additional properties are not allowed ('name' was unexpected)
error pulling image configuration: get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/f9/..: net/http: tls handshake timeout
#注释掉docker-compose.yml中的netword那几行。
nsupported config option for services.minio: 'healthcheck'
(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com