如何安装RHEL6的主要存储库

我们已经在新的服务器上安装了RHEL6。 据我们所知,我们的订阅都设置正确。 但是,当我运行yum repolist ,它不显示任何存储库。 /etc/yum.repos.d/redhat.repo是空的。 我尝试粘贴来自另一个RHEL6服务器的redhat.repo的内容,但是一旦我运行yum ,它就会再次擦除。 我只需要获取基本的RedHat存储库设置,以便我可以安装软件包。

为了确保我没有订阅问题。 我重新注册并重新认购。 我得到了所有相同的结果。

 # subscription-manager register --force # subscription-manager subscribe --pool=*redacted* 

当我login到RedHat客户门户时,它显示订阅处于活动状态。

使用GUI,我去了系统>pipe理>红帽订阅pipe理器。 在“产品”标签下,它没有显示任何产品。

当我运行yum update ,这是我得到的:

 # yum update Loaded plugins: product-id, refresh-packagekit, security, subscription-manager This system is receiving updates from Red Hat Subscription Management. Setting up Update Process No Packages marked for Update 

/etc/yum.conf内容

 [main] cachedir=/var/cache/yum/$basearch/$releasever keepcache=0 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 installonly_limit=3 

/etc/yum/pluginconf.d/rhnplugin.conf内容:

 [main] enabled = 0 gpgcheck = 1 

    以下是我如何解决这个问题,至less暂时。 我从其他工作的rhel6服务器复制了/etc/yum.repos.d/redhat.repo文件。 然后,我用这个服务器上的.pem文件replace了所有的sslclientkey和sslclientcert实例。 然后,我重命名.repo文件,以避免在更新时被擦除。 通过这样做,我能够按预期安装所有软件包。

    我将不得不继续与支持,以解决这个问题的根源。

    UPDATE

    红帽支持终于回到了我的以下指示,这固定了问题的根源,一切都很好:

    在检查您的注册系统后,我们会向您显示您目前通过RHSM进行了注册,其中一个系统也通过RHN classic注册。

    在通过客户门户login后导航到以下位置,并通过选中框并单击左下angular的“删除所选项”来删除两个系统:

    https://access.redhat.com/management/consumers/

    一旦在terminal本地完成上述操作,以GH-Server-5系统上的root身份执行以下命令:

     rhn_register 

    上述命令将打开一个RHN Classic注册的terminal,并要求input用户名和密码。 这些是您的客户门户login名和密码。 另外请确保检查所有可用的更新,除非您需要有限的更新。

    当基于terminal的tui完成你的注册问题以下命令清理yum的caching并添加正确的存储库,然后最后更新:

     yum clean all yum repolist yum update 

    正如rhnplugin.conf的内容所示,该插件被禁用。 不应该如此,通过将enabled = 0更改为enabled = 1来重新启用它。

     # subscription-manager register Username: [email protected] Password: The system has been registered with ID: 653cb615-5f5e-4339-8d28-6dc67169ecb1 # subscription-manager repos This system has no repositories available through subscriptions. # subscription-manager list +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux Server Product ID: 69 Version: 6.5 Beta Arch: x86_64 Status: Not Subscribed Status Details: Not covered by a valid subscription. Starts: Ends: # subscription-manager attach --auto Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed # subscription-manager repos +----------------------------------------------------------+ Available Repositories in /etc/yum.repos.d/redhat.repo +----------------------------------------------------------+ Repo ID: rhel-6-server-sam-source-rpms Repo Name: Red Hat Subscription Asset Manager (for RHEL 6 Server) (Source RPMs) Repo URL: https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/subscription-asset-manager/1/source/SRPMS Enabled: 0 Repo ID: rhel-ha-for-rhel-6-server-beta-debug-rpms Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 6 Server) Beta (Debug RPMs) Repo URL: https://cdn.redhat.com/content/beta/rhel/server/6/$releasever/$basearch/highavailability/debug Enabled: 0 Repo ID: rhel-6-server-rhev-agent-beta-debug-rpms Repo Name: Red Hat Enterprise Virtualization Agents for RHEL 6 Server Beta (Debug RPMs) Repo URL: https://cdn.redhat.com/content/beta/rhel/server/6/$releasever/$basearch/rhev-agent/3/debug Enabled: 0 Repo ID: rhel-6-server-cf-tools-1-source-rpms Repo Name: Red Hat CloudForms Tools for RHEL 6 (Source RPMs) Repo URL: https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/cf-tools/1/source/SRPMS Enabled: 0 Repo ID: rhel-6-server-rpms Repo Name: Red Hat Enterprise Linux 6 Server (RPMs) Repo URL: https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/os Enabled: 1 ...snip... # yum repolist Loaded plugins: product-id, security, subscription-manager, versionlock This system is receiving updates from Red Hat Subscription Management. rhel-6-server-cf-tools-1-rpms | 2.8 kB 00:00 rhel-6-server-cf-tools-1-rpms/primary_db | 18 kB 00:00 rhel-6-server-rhev-agent-rpms | 3.1 kB 00:00 rhel-6-server-rhev-agent-rpms/primary_db | 18 kB 00:00 rhel-6-server-rpms | 3.7 kB 00:00 rhel-6-server-rpms/primary_db | 23 MB 00:11 rhel-ha-for-rhel-6-server-rpms | 3.7 kB 00:00 rhel-ha-for-rhel-6-server-rpms/primary_db | 203 kB 00:00 rhel-lb-for-rhel-6-server-rpms | 3.7 kB 00:00 rhel-lb-for-rhel-6-server-rpms/primary_db | 14 kB 00:00 rhel-rs-for-rhel-6-server-rpms | 3.7 kB 00:00 rhel-rs-for-rhel-6-server-rpms/primary_db | 223 kB 00:00 repo id repo name status epel Extra Packages for Enterprise Linux 6 - 9,984 rhel-6-server-cf-tools-1-rpms Red Hat CloudForms Tools for RHEL 6 (RPMs) 31 rhel-6-server-rhev-agent-rpms Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs) 32 rhel-6-server-rpms Red Hat Enterprise Linux 6 Server (RPMs) 11,114 rhel-ha-for-rhel-6-server-rpms Red Hat Enterprise Linux High Availability (for RHEL 6 Server) (RPMs) 287 rhel-lb-for-rhel-6-server-rpms Red Hat Enterprise Linux Load Balancer (for RHEL 6 Server) (RPMs) 11 rhel-rs-for-rhel-6-server-rpms Red Hat Enterprise Linux Resilient Storage (for RHEL 6 Server) (RPMs) 333 repolist: 40,228 

    我不太了解为什么你的configuration被冲洗了…我们已经提出了检查存储库列表和configuration文件的通常步骤。 但是,如果这是一个新的服务器,你不是简单地重新安装这一点,我会build议现在这样做…

    在我职业生涯的不同阶段,我会执行一个基于CD / DVD介质的RHEL或者CentOS安装,最后会有一个奇怪的设置, 感觉不对。 有时候HTTP安装不太好。 虽然很less,我只是重新安装了系统,并继续前进。 我以前肯定有坏媒体和损坏的在线回购。 这可能不值得排除故障:)

    快速search发现红帽解决scheme#67936build议联系支持,以解决问题。

    这可能是你的权利证书是腐败的。

    • 使用openssl x509 -in /etc/pki/entitlement/3019xxxxxxxxxxxxxxx.pem -text -nooutvalidation授权证书openssl x509 -in /etc/pki/entitlement/3019xxxxxxxxxxxxxxx.pem -text -noout
    • 请检查/var/log/messages以获取来自rhsm-complianced的警告
    • 检查消息的rhsm.log日志文件
    • 运行yum update来validation初始更新后是否存储库。