阿里云CentOS 8.x Error: Failed to download metadata for repo 'AppStream': ...
阿里云CentOS 8.x Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were triedErrors during downloading metadata for repository 'AppStream':
- Status code: 404 for http://mirrors.cloud.aliyuncs.co ... repodata/repomd.xml (IP: 100.100.2.148)
Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
# Executing docker install script, commit: 93d2499759296ac1f9c510605fef85052a2c32be
+ sh -c 'yum install -y -q yum-utils'
Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
# yum install openssh openssh-server openssh-clients
安装依赖yum install -y yum-utils
配置镜像仓库yum-config-manager \ --add-repo \ http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
更新yum缓存# # yum makecache fast,带fast参数的话,centos8以上版本会报错。yum makecache
安装containerd.ioyum install https://download.docker.com/linu ... 3.3.fc30.x86_64.rpm
安装docker# 安装Docker,执行如下命令的时候报错,containerd.io有问题。yum install docker-ce docker-ce-cli containerd.io
启动以及测试systemctl start dockerdocker version
配置阿里云加速,如果是阿里云用户,在自己账户中可以找到加速的镜像链接https://common.cnblogs.com/images/copycode.gif
sudo mkdir -p /etc/dockersudo tee /etc/docker/daemon.json <<-'EOF'{"registry-mirrors": ["https://s9j9zpi7.mirror.aliyuncs.com"]}EOFsudo systemctl daemon-reloadsudo systemctl restart dockerhttps://common.cnblogs.com/images/copycode.gif
安装 Docker-Compose (不是必要)https://common.cnblogs.com/images/copycode.gif
# Docker-Compose项目是Docker官方的开源项目,负责实现对Docker容器集群的快速编排。# Centos8提供了pip3,没有pip,想自己安装的话,也会找不到合适的版本。pip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com --upgrade pippip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com docker-composehttps://common.cnblogs.com/images/copycode.gif
页:
[1]