首页 > 其他 > 详细

Centos 7配置阿里云yum源

时间:2019-06-06 00:52:17      阅读:89      评论:0      收藏:0      [点我收藏+]

1. 禁用 yum插件 fastestmirror

1)修改插件的配置文件

# cp /etc/yum/pluginconf.d/fastestmirror.conf /etc/yum/pluginconf.d/fastestmirror.conf.bak 

# vi  /etc/yum/pluginconf.d/fastestmirror.conf  

enabled = 1//由1改为0,禁用该插件

2)修改yum的配置文件

# cp /etc/yum.conf /etc/yum.conf.bak

# vi /etc/yum.conf

plugins=1//改为0,不使用插件

2. 获取阿里云 repo

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

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

cp /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.bak
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

3. 

yum clean all

yum makecache

完工。

 

Centos 7配置阿里云yum源

原文:https://www.cnblogs.com/digdeep/p/10982669.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!