Centos7 修改yum源为阿里源

centos7 修改yum源为阿里源,某下网络下速度比较快 首先是到yum源设置文件夹里

首先安装 Wget

yum -y install wget
 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

清理缓存

yum clean all

yum clean all 重新生成缓存

yum makecache

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注