铁路校友-我拆过的坑cycx

主页:www.j6f.cn知识星球,快手号、抖音号、视频号、微信公众号、百家号、个人博客网站,同名。

解决docker安装中没有网络的问题

编辑 /etc/resolv.conf 文件(需 root 权限,比如 vim /etc/resolv.conf ),添加公共 DNS ,比如阿里 DNS:nameserver 223.5.5.5

nameserver 223.6.6.6 备份原镜像源配置:mkdir /etc/yum.repos.d/bak

mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/bak/  下载新的镜像源配置(以阿里 CentOS 7 镜像为例 ):wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 清除缓存并生成新缓存:yum clean all

yum makecache  yum --disablerepo=base install yum-utils


发表评论:

Powered By Z-BlogPHP 1.7.3

Copyright Your WebSite.Some Rights Reserved.