配置常用远程源

配置常用远程源

maven

npm

  1. 变更npm远程源为淘宝源。
npm config set registry https://registry.npm.taobao.org
  1. 查看npm远程源配置
npm config get registry

docker

yum

Centos下更改yum远程源

  1. 安装wget
yum install -y wget   (如果已经安装了则省略)
  1. 备份 /etc/yum.repos.d/CentOS-Base.repo文件
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.back
  1. 下载阿里云的Centos-7.repo文件(根据不同Centos版本更换数字)
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  1. 重新加载yum
yum clean all
yum makecache
  1. 检查配置的源是否是阿里的
 cat /etc/yum.repos.d/CentOS-Base.repo

猜你喜欢

转载自www.cnblogs.com/RitualYang/p/12037725.html