如何更改存储库RHEL

时间:2014-03-11 12:39:38

标签: linux repository rhel

所以,我试图在RHEL中更改我的Repositorys但是我总是得到以下消息并且没有IDEA意味着什么。

Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Could not retrieve mirrorlist http://mirrors.elrepo.org/mirrors-elrepo.el6 error was
12: Timeout on http://mirrors.elrepo.org/mirrors-elrepo.el6: (28, 'connect() timed out!')
http://elrepo.org/linux/elrepo/el6/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://elrepo.org/linux/elrepo/el6/x86_64/repodata/repomd.xml: (28, 'connect() timed out!')
Trying other mirror.
http://mirrors.coreix.net/elrepo/elrepo/el6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2a01:c0:2:3d::2: Network is unreachable"

[...]

Trying other mirror.
http://mirror.ventraip.net.au/elrepo/elrepo/el6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2400:b800:1:1::15: Network is unreachable"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: elrepo. Please verify its path and try again

2 个答案:

答案 0 :(得分:0)

存储库的配置位于RHEL之类的系统上的/etc/yum.repos.d/文件夹中。

查看您的错误消息:

  1. 您没有使用RHEL的有效订阅,因此您无法访问任何RHEL存储库。使用订阅管理器注册
  2. 您尝试连接的每个存储库都无法访问,或者您正在超时。检查您的互联网配置/连接。

答案 1 :(得分:0)

如果您有os镜像,则可以创建自己的存储库。

使用

将os映像挂载到某个文件夹/ / var / rhel-repo
mount -o loop /path/to/os_image /var/rhel-repo

在/etc/yum.repos.d/customrepo中创建repo文件

[customrepo]
name=Custom Repository
baseurl=file:///var/customrepo
enabled=1
gpgcheck=0

保存文件。然后

yum clean all