Skip to content

Instantly share code, notes, and snippets.

@seanorama
Created May 8, 2018 09:30
Show Gist options
  • Save seanorama/4c029ac42affd5f3a0d9d1c82ea39c1c to your computer and use it in GitHub Desktop.
Save seanorama/4c029ac42affd5f3a0d9d1c82ea39c1c to your computer and use it in GitHub Desktop.
enable-yum-repos
## -----------------------------------------
## Enable required yum repos in redhat/rhel7
## Get names of repos:
sudo subscription-manager repos --list
sudo yum repolist all
## Look for the 'extra', 'optional' and 'oracle-java' packages.
## - oracle-java may not be available
## For example, on normal RHEL it is:
repos="rhel-7-server-extras-rpms rhel-7-server-optional-rpms rhel-7-server-thirdparty-oracle-java-rpms"
## Another example, on AWS it is the following. They do not provide oracle-java:
repos="rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional"
## Enable the repos
sudo yum-config-manager --enable ${repos}
## -----------------------------------------
## Notes:
## Above is needed for some packages in HDP (Hortonworks Data Platform) but useful for anyone wanting te enable these repos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment