TL; DR …我用一个内部的replace公共yum回购,我不知道为什么两个公开的继续显示在“ yum repolist ”,当他们不出现在正常的configuration文件。
我已经安装了Oracle Linux 7.1(紧密地从RHEL 7.1派生而来),并将系统的yum版本库从公开版本转换到我们的内部私有版本。
Oracle Linux 7.1带有一个默认的/etc/yum.repos.d/public-yum-ol7.repo ,其中包含几个repos,只有两个启用的是来自public-yum.oracle.com “ ol7_latest ”和“ ol7_UEKR3 ” public-yum.oracle.com 。
我删除这个文件,并复制我自己的.repo文件… uswulnrepo01_ol7_latest.repo和uswulnrepo01_ol7_uekr3.repo 。 ( uswulnrepo01是我们内部的yum版本库)。
在我这样做之后,我用一个“ yum clean all && yum repolist ”进行validation,以确认只有我的两个存储库出现,他们所做的。
问题是我最终有4个仓库…
[root@oel7template yum.repos.d]# yum repolist Loaded plugins: langpacks, rhnplugin This system is receiving updates from ULN. repo id repo name status ol7_x86_64_UEKR3 Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest 158 ol7_x86_64_latest Oracle Linux 7 Latest (x86_64) 9,212 uswulnrepo01_ol7_UEKR3/x86_64 Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest 123 uswulnrepo01_ol7_latest/x86_64 Oracle Linux 7 Latest (x86_64) 6,784 repolist: 16,277
我无法弄清楚ol7_x86_64_UEKR3和ol7_x86_64_latest是从哪里来的。 当我尝试获取有关存储库的扩展信息(我删除了不相关的数据)…
[root@oel7template yum.repos.d]# yum repolist -v Looking for repo options for [main] Looking for repo options for [ol7_x86_64_UEKR3] Repo 'ol7_x86_64_UEKR3' setting option 'enabled' = '1' Repo 'ol7_x86_64_UEKR3' setting option 'gpgcheck' = '1' Repo 'ol7_x86_64_UEKR3' setting option 'timeout' = '120' Looking for repo options for [ol7_x86_64_latest] Repo 'ol7_x86_64_latest' setting option 'enabled' = '1' Repo 'ol7_x86_64_latest' setting option 'gpgcheck' = '1' Repo 'ol7_x86_64_latest' setting option 'timeout' = '120' Repo-id : ol7_x86_64_UEKR3 Repo-name : Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest Repo-baseurl : https://linux-update.oracle.com/XMLRPC/GET-REQ/ol7_x86_64_UEKR3 Repo-id : ol7_x86_64_latest Repo-name : Oracle Linux 7 Latest (x86_64) Repo-baseurl : https://linux-update.oracle.com/XMLRPC/GET-REQ/ol7_x86_64_latest Repo-id : uswulnrepo01_ol7_UEKR3/x86_64 Repo-name : Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest Repo-baseurl : http://uswulnrepo01.[REDACTED]/yum/OracleLinux/OL7/UEKR3/x86_64/ Repo-filename: /etc/yum.repos.d/uswulnrepo01_ol7_uekr3.repo Repo-id : uswulnrepo01_ol7_latest/x86_64 Repo-name : Oracle Linux 7 Latest (x86_64) Repo-baseurl : http://uswulnrepo01.[REDACTED]/yum/OracleLinux/OL7/latest/x86_64/ Repo-filename: /etc/yum.repos.d/uswulnrepo01_ol7_latest.repo repolist: 13,799
请注意,前两个不需要的linux-update.oracle.com条目没有Repo-filename值,也不匹配public-yum-ol6.repo默认public-yum-ol6.repo 。
我试过一切删除这些条目,但我无法弄清楚如何。 我查了一下其他的yumconfiguration文件,在/etc/目录下做了一些内容search,找不到任何相关的东西。 我甚至已经删除了/var/cache/yum/ 。 之后当我做了“ yum repolist ”时,公共yum文件夹重新出现。
我怀疑百胜本身是由甲骨文修改,所以这些回购必须在一个configuration文件的地方…我怎样才能弄清楚在哪里? 有没有一个命令列出yum读取所有configuration文件?
编辑
我创build了一个新的configuration文件“ /etc/yum.repos.d/ol7_x86_64_UEKR3.repo ”,试图彻底禁用回购:
[ol7_x86_64_UEKR3] name=Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest enabled=0
而我得到一个新的错误(再次,删除不必要的信息):
[root@oel7template yum.repos.d]# yum repolist -v Looking for repo options for [main] Looking for repo options for [ol7_x86_64_UEKR3] Repo 'ol7_x86_64_UEKR3' setting option 'enabled' = '1' Repo 'ol7_x86_64_UEKR3' setting option 'gpgcheck' = '1' Repo 'ol7_x86_64_UEKR3' setting option 'timeout' = '120' Repository ol7_x86_64_UEKR3 is listed more than once in the configuration
对我来说,这强化了这个设置是在某个configuration文件中的想法…但我怎么find它?
编辑/etc/yum/pluginconf.d/rhnplugin.conf
并设置:
[ol7_x86_64_UEKR3] enabled=0 [ol7_x86_64_latest] enabled=0