A, yum replace domestic sources
1. Go to the file path yum address
2, download the corresponding original packet address
[root@web1 yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
--2019-05-21 22:36:41-- http://mirrors.163.com/.help/CentOS7-Base-163.repo
Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1572 (1.5K) [application/octet-stream]
Saving to: ‘CentOS7-Base-163.repo.1’
100%[===============================================================================================>] 1,572 --.-K/s in 0.001s
2019-05-21 22:36:41 (2.84 MB/s) - ‘CentOS7-Base-163.repo.1’ saved [1572/1572]
[root@web1 yum.repos.d]#
3, lists all installed package
[root@web1 yum.repos.d]# yum list
4, if the case where the source 163 and a base is not enough to be extended to install a source epel
yum install -y epel-release
yum list |grep epel
Two, yum download the rpm package
1, download the package does not install
[Root @ web1 yum.repos.d] # yum install -y path package names --downloadonly --downloaddir =
2, already installed packages To reinstall
[Root @ web1 yum.repos.d] # yum reinstall -y path package names --downloadonly --downloaddir =
**** you will need rpm package packed later when re-use can be directly invoked ****