配置常用远程源
maven
npm
- 变更npm远程源为淘宝源。
npm config set registry https://registry.npm.taobao.org
- 查看npm远程源配置
npm config get registry
docker
yum
Centos下更改yum远程源
- 安装wget
yum install -y wget (如果已经安装了则省略)
- 备份 /etc/yum.repos.d/CentOS-Base.repo文件
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.back
- 下载阿里云的Centos-7.repo文件(根据不同Centos版本更换数字)
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- 重新加载yum
yum clean all
yum makecache
- 检查配置的源是否是阿里的
cat /etc/yum.repos.d/CentOS-Base.repo