7.6 yum replace domestic source
7.7 yum download rpm package
7.8/7.9 source package installation
1. yum replaces domestic source
Generally, the sources of yum are foreign websites, and the installation is relatively slow. First of all, we have to replace the domestic source.
The first step is to copy the original backup file back, and then delete the source packagecp . ./yum.repos.d.bak/* . Copy all files under yum.repos.d.bak
# rm -f CentOS-Base.repo 删除CentOS-Base.repo文件
The second part is changed to a domestic website
. First, download a repo filewget http://mirrors.163.com/.help/CentOS7-Base-163.repo)#Here, since the source package is deleted, wget cannot be used
# curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo # 用curl -O 安装
The third test can be installed with yum
# yum list ----------是列出所有可安装的软件包列表,包含已安装和未安装的。
# yum install 包名 --------安装一下列出的包列表中的一个()
# yum clean all ----清除缓存
# yum repolist all 查看您拥有的仓库
2.yum download rpm package