因此,我知道如何更新离线流变/centos 7系统,我使用的是第二个相同的系统,这是注册的RHN和其他存储库。
在/etc/yum.conf中,我有keep_cache = 1,在/var/cache/yum/x86_64/7Server//packages/下面有1000+ rpms
更新:忘记提到我也在做/etc/yum.repos.d/local.repo有file:///root/localrepo
例如,在first time上,如果简单地将所有rpm放在一个文件夹/root/localrepo/下,那么做createrepo /root/localrepo就可以了,那么yum update就能正常工作。
将来,在我的RHN连接系统上,我会得到新的rpm,我会将它们移动并添加到我的离线系统中,在/root/localrepo下,但是yum update不会自动看到它们。那么,createrepo的正确用法是什么使yum update在这个脱机系统上如预期的那样工作呢?
发布于 2019-05-14 17:34:42
您不仅需要执行createrepo,还需要安装和运行web服务器,将其指向包( repo )所在的目录,并在/etc/yum-repos.d目录中添加一个记录/文件,该目录指向您的web服务器和您的回购路径。
您也可以跳过web服务器步骤,但是在这种情况下,您的回购文件应该指向file://path而不是http://server/path。
有关回购配置文件的更多信息,请查看这篇文章。
下面是上面站点中的示例配置文件
[red-hat-enterprise-linux-scalable-file-system-for-rhel-6-entitlement-rpms]
name = Red Hat Enterprise Linux Scalable File System (for RHEL 6 Entitlement) (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel/entitlement-6/releases/$releasever/$basearch/scalablefilesystem/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/key.pem
sslclientcert = /etc/pki/entitlement/11300387955690106.pemhttps://unix.stackexchange.com/questions/518927
复制相似问题