centos 7 Ali cloud yum install domestic source

in the /etc/yum.repos.d/ on cd
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
as wget -O /etc/yum.repos .d / CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
the vi CentOS-Base.repo
of the yum in clean all
of the yum makecache
of the yum update to the
the history
of the yum list, you | epel-with the term release a grep
of the yum -y to install the epel-with the term release
as wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
of the yum in clean all
of the yum makecache
update to the of the yum
of the yum repolist all
of the yum repolist be enabled to

 

 

 

2.1.1 configuration steps

According to the official website of explanation, we explain in detail the meaning of each step.

(1), the backup, as the CentOS-Base.repo CentOS-Base.repo.backup

/etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup mv
1
(2), to download new http://mirrors.aliyun.com/repo /Centos-7.repo, and named CentOS-Base.repo

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
or
curl -o /etc/yum.repos.d/CentOS-Base http://mirrors.aliyun.com/repo/Centos-7.repo .repo
. 1
2
. 3
(. 3), the cache clear

yum clean all # Clear all the system cache yum
yum makecache # yum generated cache
yum Update
. 1
2
. 3
2.1.2, install and configure the source EPEL

(1), to view the available sources epel

[java@localhost yum.repos.d]$ yum list | grep epel-release
epel-release.noarch 7-11 extras
[java@localhost yum.repos.d]$
1
2
3
(2)、安装 epel

[Java @ localhost yum.repos.d] $ yum the install epel -Y-Release
...... ..... omitted
. 1
2
(3), arranged mirroring provides epel source Ali

-O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo wget
1
4, clear the cache

yum clean all # Clear all the system cache yum
yum makecache # yum generated cache
yum Update
. 1
2
. 3
2.1.3, Source view yum

See all yum source:

All repolist yum
1
View Available yum source:

Enabled repolist yum
----------------
Disclaimer: This article is the original article CSDN bloggers "xiaojin21cen", and follow CC 4.0 BY copyright agreement, reproduced, please attach the original source and this link statement.
Original link: https: //blog.csdn.net/xiaojin21cen/article/details/84726193

Guess you like

Origin www.cnblogs.com/ValyrianSteel/p/11518827.html