下载工具包
# yum install -y yum-utils
创建下载目录
# mkdir -p /data1/centos/releasever
- releasever:系统版本
获取repoid
# yum repolist
repo id repo name
AppStream CentOS-8 - AppStream
BaseOS CentOS-8 - Base
docker-ce-stable Docker CE Stable - x86_64
extras CentOS-8 - Extras
同步存储库
reposync -n --repoid=AppStream --repoid=BaseOS --repoid=docker-ce-stable --repoid=extras -p /data1/centos/releasever
- 同步存储库时可以指定一个repoid,也可以指定多个repoid。