Linux 如何更改存储库RHEL

Linux 如何更改存储库RHEL,linux,repository,rhel,Linux,Repository,Rhel,所以,我试图改变我在RHEL中的位置,但我总是得到以下信息,不知道这意味着什么 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://mi

所以,我试图改变我在RHEL中的位置,但我总是得到以下信息,不知道这意味着什么

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

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

查看您的错误消息:

  • 您没有RHEL的活动订阅,因此无法访问任何RHEL存储库。使用订阅管理器注册
  • 您尝试连接到的每个存储库都无法访问,或者您正在超时。检查您的internet配置/连接

  • 如果您有操作系统映像,您可以创建自己的存储库

    在某个文件夹(比如/var/rhel repo)中使用

    mount -o loop /path/to/os_image /var/rhel-repo
    
    在/etc/yum.repos.d/customrepo-as中创建repo文件

    [customrepo]
    name=Custom Repository
    baseurl=file:///var/customrepo
    enabled=1
    gpgcheck=0
    
    保存文件。然后

    百胜