一、安装epel安装

epel是个好东西,不过国外的速度实在是不能忍受。所以 有了这篇文章。

1、 首先卸载以前装的epel以免影响

rpm -e epel-release

2、 下载阿里提供的epel

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

3、yum clean all

4、yum makecache

好了,现在你要装epel源的软件的时候 不再慢吞吞了。

或者直接安装

rpm -ivh http://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm 

二、Centos光盘的库 

1、备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5

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

CentOS 6

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

CentOS 7

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

3、之后运行yum makecache生成缓存

参考:

http://mirrors.aliyun.com/help/centos

相关文章:

  • 2021-12-19
  • 2021-07-02
  • 2021-05-15
  • 2021-12-11
  • 2021-05-16
  • 2021-06-24
  • 2021-10-02
猜你喜欢
  • 2021-11-15
  • 2021-10-25
  • 2021-09-06
  • 2021-12-15
  • 2022-12-23
  • 2021-05-27
  • 2021-12-06
相关资源
相似解决方案