CentOS yum 7 is replaced by domestic sources, Ali cloud yum

We are now the default CentOS yum 7.5 source replacement for domestic Ali cloud yum source, so download and install the update speed faster, the replacement is very simple, simply record what step.

1, backup

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

or

mv /etc/yum/repos.d/CentOS-Base.repo{,.date -I}

2. Download the new CentOS-Base.repo to /etc/yum.repos.d/

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

. 6 the CentOS
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
or
curl -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

or

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

3, add EPEL

CentOS 6

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

CentOS 7

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

As shown below:

CentOS yum 7 replacement for domestic Ali yum source

4, clean the cache and generates a new cache

yum clean all

yum makecache

CentOS yum 7 replacement for domestic Ali yum source

We can easily get tens of thousands on CentOS comes with no source of software from source by EPEL yum command. EPEL package provided by Fedora packages are mostly based on its corresponding, does not conflict with the Linux distribution version of Enterprise Edition software or replace its file.

RHEL / CentOS system has many third-party sources, such as the more popular RpmForge, RpmFusion, EPEL, Remi, and so on. However, attention is required, if the system is to add multiple third-party sources, and therefore may be a conflict - a software package can be obtained from multiple sources, some of the source base packages will replace the system, which may produce unexpected mistake. It is known and there Rpmforge EPEL create a conflict. For these problems we recommend that priority adjust the source or sources have installed selective, but this requires a complex operation, if you are unsure how to do this, we recommend that you only install a third-party source.

Guess you like

Origin www.linuxidc.com/Linux/2019-08/160310.htm