开发环境镜像设置


一、阿里系镜像

# Composer
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

# npm
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global

# CentOS
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

# epel
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

# Pypi
echo "[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com" > ~/.pip/pip.conf

二、其他镜像

# 推荐
go env -w GOPROXY=https://goproxy.cn,direct

# GoProxy Win
# set GOPROXY=https://proxy.golang.org
setx GOPROXY=https://mirrors.aliyun.com/goproxy/

# GoProxy Linux
# export GOPROXY=https://proxy.golang.org
export GOPROXY=https://mirrors.aliyun.com/goproxy/