赞
踩
mkdir ~/Downloands/store
yum repolist
仓库说明:
UnionTechOS-Server-20-everything 是全量仓库,包含所有安装包。
UnionTechOS-Server-20-update 新增或更新的软件包在update仓库发布。
1.下载全量仓库
# reposync --repoid=UnionTechOS-Server-20-everything ~/Downloads/store
2.下载update仓库
# sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/UnionTechOS-everything-x86_64.repo
# reposync --repoid=UnionTechOS-Server-20-update ~/Downloads/store
1.全量仓库配置为软件仓库
# createrepo /store/UnionTechOS-Server-20-everything/
2. update仓库配置为软件仓库
# createrepo /store/UnionTechOS-Server-20-update/
关闭其他仓库
# mkdir /etc/yum.repos.d/back
# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/back
配置一个本地仓库源文件
# vi /etc/yum.repos.d/UnionTechOS-Local.repo
[UnionTechOS-Local]
name=UnionTechOS-Local
baseurl=file:///root/Downloads/store/UnionTechOS-Server-20-everything/
enabled=1
gpgcheck=0
# vi /etc/yum.repos.d/UnionTechOS-Local_update.repo
[UnionTechOS-Local_update]
name=UnionTechOS-Local_update
baseurl=file:///root/Downloads/store/UnionTechOS-Server-20-everything/
enabled=1
gpgcheck=0
# yum repolist
# yum list | grep docker
# reposync -n --repoid=UnionTechOS-Server-20-update -p /root/Downloads/store
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。