Blogger Information
Blog 12
fans 1
comment 1
visits 19105
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Linux下yum源的修改
黄小凡的博客
Original
1505 people have browsed it

  CentOS 自带的yum源链接是国外的网址,国内访问速度非常慢,推荐使用国内的yum源,下面以国内阿里云的源为例:https://mirrors.aliyun.com/

  yum源目录配置在  /etc/yum.repos.d下,先进入该目录 

cd /etc/yum.repos.d

 接着可以备份旧的配置文件,或者直接删掉该文件

mv CentOS-Base.repo CentOS-Base.repo.bak
或者
rm -rf CentOS-Base.repo

下载对应的yum源,如果是CentOS7就下载7的yum源,都在这个链接  https://mirrors.aliyun.com/repo/

wget -O CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

安装epel  repo 源  都在这个链接  https://mirrors.aliyun.com/repo/

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

清理缓存

yum clean all

重新生成缓存

yum makecache


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post