一、阿里云yum源
[root@master ~]# yum -y install wget
[root@master ~]# mkdir /etc/yum.repos.d/repo.bak
[root@master ~]# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo.bak/
[root@master ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@master ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
建立缓存并更新:
[root@master ~]# yum clean all
[root@master ~]# yum makecache
[root@master ~]# yum -y upgrade
二、阿里云pip源
[root@master ~]# mkdir ~/.pip
[root@master ~]# vim ~/.pip/pip.conf
[global]
trusted-host = mirrors.aliyun.com
index-url = https://mirrors.aliyun.com/pypi/simple
三、Docker国内镜像源
这里采用网易提供的Docker容器镜像源:
[root@master ~]# mkdir -p /etc/docker
[root@master ~]# vim