Created
February 2, 2016 12:35
-
-
Save ricfeatherstone/9d7dd52c55fa639c8718 to your computer and use it in GitHub Desktop.
Enable rhel-server-extras repository in AWS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import print_function | |
import fileinput | |
in_start_extras_section = False | |
for line in fileinput.input("/etc/yum.repos.d/redhat-rhui.repo", inplace=True): | |
if line.find("[rhui-REGION-rhel-server-extras]") != -1: | |
in_start_extras_section = True | |
if in_start_extras_section: | |
if line.find("enabled=0") != -1: | |
print("enable=1") | |
in_start_extras_section = False | |
else: | |
print(line, end='') | |
else: | |
print(line, end='') |
Or even better
sudo yum repolist disabled
sudo yum-config-manager --enable "Red Hat Enterprise Linux Server 7 Extra(RPMs)"
For me, the actual name was slightly different. Thanks for this hint 👍
yum-config-manager --enable "Red Hat Enterprise Linux 7 Server - Extras from RHUI (RPMs)"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Better to create a new file in yum.repos.d with the content to enable the repo