centos7 配置阿里yum源

cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
wget -O CentOs-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

注:如果没安装wget需要安装:yum install -y wget
如果安装wget出错,参考:https://blog.csdn.net/weixin_40391011/article/details/104068992

#yum源更新命令
yum clean all
yum makecache
yum update

你可能感兴趣的:(Linux,yum,阿里yum源配置,centos7)