Centos 7配置阿里云yum源

1. 禁用 yum插件 fastestmirror缓存

1)修改插件的配置文件阿里云

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

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

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

2)修改yum的配置文件ast

# cp /etc/yum.conf /etc/yum.conf.baktest

# vi /etc/yum.conf配置

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

2. 获取阿里云 repoyum

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

完工。

相关文章
相关标签/搜索