1. 备份原来的yum源

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

2.设置aliyun的yum源

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

3.添加EPEL源

EPEL(http://fedoraproject.org/wiki/EPEL)是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。装上 EPEL后,可以像在 Fedora 上一样,可以通过 yum install package-name,安装更多软件。

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

4.清理缓存并生成新的缓存

yum clean all
yum makecache

相关文章:

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