First, the cause
A few days recently discovered server to install new software download packages always online, both cost flow and time-consuming, yum online source for all synchronization down
Second, synchronization source yum
- Installation package
yum -y install yum-utils createrepo
- View all warehouses
yum repolist
- Select a warehouse synchronization
#参数-r为仓库id,参数-p为指定路径下载,会在指定路径下生成跟仓库id一样的文件夹 reposync -r CentOS7 -p /root/
- Generates metadata repository, yum source configuration change
createrepo /root/CentOS7/ vim /etc/yum.repos.d/local.repo ######################### [CentOS7] name=Centos7.6 baseurl=file:///root/CentOS7 gpgcheck=0 enabled=1 #########################