6

I created a fresh Amazon EC2 instance for testing our software against the Apache 2.4 package from the Red Hat Software Collections. My main motivation was to test on a clean install without the cruft I expect on our local machines.

To install the httpd24 package one needs to add the RHSCL repository via subscription manager. This did no work on the EC2 instance:

# subscription-manager repos --enable rhel-server-rhscl-6-rpms
Error: [...] is not a valid repository ID. Use --list option to see valid repositories.
# subscription-manager repos --list
This system has no repositories available through subscriptions.

According to the Red Hat Enterprise Linux on Amazon EC2 FAQ I would have expected the system to be subscribed automatically. Quote (emphasis added):

Red Hat Enterprise Linux on Amazon EC2 is offered at either a flat, hourly rate with no commitment (On-Demand), or through a one-time, upfront payment (Reserved Instances). Both purchase options include Amazon EC2 compute charges and Red Hat Enterprise Linux subscription charges.

Searching the AWS developer forums I only found an answer saying that one needs an extra license from RedHat (and many other vague answers).

I finally found out that it's sufficient to modify the file /etc/yum.repos.d/redhat-rhui.repo like this:

[rhui-REGION-rhel-server-rhscl]
name=Red Hat Enterprise Linux Server 6 RHSCL (RPMs)
# ...
enabled=1

This seems to work but I wonder if this is really the "right way" to do it.

Bluehorn
  • 281
  • 3
  • 7
  • How did you solve the issue? I've set the flag `enabled` to `1` but still the subscription-manager returns no repos – Mazzy May 05 '17 at 17:51
  • 1
    I never found a better way. Subscription manager will not list the repositories but yum will install the contained packages just fine. – Bluehorn May 06 '17 at 17:51

2 Answers2

3

Ensure the Red Hat Update Infrastructure (RHUI) configuration is up to date:

yum update rh-amazon-rhui-client

List the available repositories:

yum repolist all

Find the appropriate repository, and enable it. At the time of writing, the Red Hat Software Collections repository is called rhel-server-rhui-rhscl-7-rpms:

yum-config-manager --enable rhel-server-rhui-rhscl-7-rpms
Steve Hart
  • 131
  • 3
1

Not sure about RHEL6, but on RHEL7 you can use yum-config-manager

yum-config-manager --enable 'Red Hat Enterprise Linux Server 7 RHSCL (RPMs)'

shro
  • 11
  • 1