The replacement CentOS yum yum Ali cloud for domestic source

Yellow dog Updater (Yum) are all versions of CentOS default package manager, yum main function is more convenient to add / delete / update the RPM package, automatically resolve package dependency problem, easy to manage a large system update problem, the idea is to the use of a central warehouse (repository) relationship management applications, and even part of a distribution, for the upgrade, installation of software based on the calculated dependencies, delete and other operations, reducing the problem of dependencies Linux users have a headache. You can configure multiple resource library (Repository), simple configuration file (/etc/yum.conf), add or remove dependencies automatically solve the problems encountered when the rpm package, to maintain consistency with the RPM database.

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
mv /etc/yum/repos.d/CentOS-Base.repo{,.date -I}

 

2. Download the new CentOS-Base.repo to /etc/yum.repos.d/
CentOS 5 
wget -O /etc/yum.repos.d/CentOS-Base.repo http: // mirrors.aliyun.com/repo/Centos-5.repo 
curl -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 
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 
curl -o /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

4, clean the cache and generates a new cache

yum clean all
yum makecache

EPEL (Extra Packages for Enterprise Linux, additional packages Enterprise Linux) is a Fedora software repository project team maintained for RHEL / CentOS default package provided they do not offer. This source is compatible with RHEL and CentOS and Scientific Linux such as a derivative version.

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.cnblogs.com/lee-qi/p/12370150.html