缓存rpm包,以make为例
sh
mkdir -p /data/yum
yumdownloader --resolve --destdir=/data/yum make
制作离线yum包
sh
yum install createrepo -y
cd /data/yum
createrepo .
写yum配置文件/etc/yum.repos.d/local.repo
sh
[local-repo]
name=local-repo
baseurl=file:///data/yum
enabled=1
gpgcheck=0
priority=1
yum repolist all