npm config set registry https://registry.npm.taobao.org
npm config get registry
yum install -y wget (如果已经安装了则省略)
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.back
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
cat /etc/yum.repos.d/CentOS-Base.repo
原文:https://www.cnblogs.com/RitualYang/p/12037725.html