首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何移除不存在的/幻影阴库?

如何移除不存在的/幻影阴库?
EN

Server Fault用户
提问于 2015-03-20 22:35:10
回答 1查看 4.5K关注 0票数 1

TL;我正在用内部的回复替换公共的yum repos,并且我不知道为什么两个公共的在"yum repolist“中继续显示,而它们没有出现在正常的配置文件中.

我已经安装了OracleLinux7.1(从RHEL7.1中直接派生出来),并且正在将系统的yum存储库从公开repos切换到我们内部的私有存储库。

OracleLinux7.1附带了一个默认的/etc/yum.repos.d/public-yum-ol7.repo,其中包含几个repos,唯一启用的两个是来自public-yum.oracle.com的"ol7_latest“和"ol7_UEKR3”。

我删除这个文件并复制我自己的.repo文件.uswulnrepo01_ol7_latest.repouswulnrepo01_ol7_uekr3.repo.(uswulnrepo01是我们内部的yum存储库)。

在我这样做之后,我用一个"yum clean all && yum repolist“来验证我的两个存储库是否会出现,而它们就是这样做的。

问题是我最终有了4个仓库..。

代码语言:javascript
复制
[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_UEKR3ol7_x86_64_latest是从哪里来的。当我试图获得存储库的扩展信息时(我已经删除了无关的数据).

代码语言:javascript
复制
[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.oracle.com

我已经尽力删除这些条目,但我不知道如何删除这些条目。我查看过其他yum配置文件,对/etc/目录进行了一些内容搜索,但找不到任何相关的内容。我甚至删除了/var/cache/yum/的内容。当我做了一个"yum repolist“之后,公共的yum文件夹重新出现。

我怀疑yum本身是由Oracle修改的,所以这些repos必须在某个配置文件中.我怎么知道在哪里?是否有列出所有配置文件yum读取的命令?

编辑

我创建了一个新的配置文件"/etc/yum.repos.d/ol7_x86_64_UEKR3.repo“,试图永久禁用repo:

代码语言:javascript
复制
[ol7_x86_64_UEKR3]
name=Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest
enabled=0

我得到一个新的错误(同样,删除了不必要的信息):

代码语言:javascript
复制
[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

对我来说,这强化了这个设置在某个配置文件中的想法.但我怎么找到它呢?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2015-03-20 23:02:42

编辑/etc/yum/pluginconf.d/rhnplugin.conf

并设置:

代码语言:javascript
复制
[ol7_x86_64_UEKR3]
enabled=0

[ol7_x86_64_latest]
enabled=0
票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/677114

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档