对于常规的,使用网易163的源,对于EPEL,使用清华USTC的源。

Base

备份原来的源文件,然后下载网易的即可。

cd /etc/yum.repos.d
mv CentOS6-Base.repo CentOS6-Base.repo.bak
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

http://mirrors.163.com/.help/CentOS6-Base-163.repo

EPEL

安装完EPEL源后编辑下面两个文件。

1、epel.repo

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://centos.ustc.edu.cn/epel/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://centos.ustc.edu.cn/epel/7/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://centos.ustc.edu.cn/epel/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

2、epel-testing.repo

[epel-testing]
name=Extra Packages for Enterprise Linux 7 - Testing - $basearch
baseurl=http://centos.ustc.edu.cn/epel/testing/7/$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-testing-debuginfo]
name=Extra Packages for Enterprise Linux 7 - Testing - $basearch - Debug
baseurl=http://centos.ustc.edu.cn/epel/testing/7/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-testing-source]
name=Extra Packages for Enterprise Linux 7 - Testing - $basearch - Source
baseurl=http://centos.ustc.edu.cn/epel/testing/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
最后修改:2023 年 08 月 02 日
如果觉得我的文章对你有用,请随意赞赏