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