系统相关
首页 > 系统相关> > centos7 修改yum源为阿里源

centos7 修改yum源为阿里源

作者:互联网

# 1.先检查是否有wget命令,如果没有wget,先下载:
yum install -y wget

# 2.安装base reop源

cd /etc/yum.repos.d

# 3.接着备份旧的配置文件  
mv CentOS-Base.repo CentOS-Base.repo.bak

# 4.下载阿里源的文件
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/Centos-7.repo

# 5.清理缓存
yum clean all

# 6.重新生成缓存
yum makecache

# 7. 再次查看yum源信息
yum repolist

标签:repo,源为,repos,centos7,etc,Base,yum,wget
来源: https://blog.csdn.net/weixin_40816738/article/details/118459613