Skip to content

Instantly share code, notes, and snippets.

@abn
Created March 9, 2015 07:21
Show Gist options
  • Save abn/0c1d030958a468cb6590 to your computer and use it in GitHub Desktop.
Save abn/0c1d030958a468cb6590 to your computer and use it in GitHub Desktop.
Install latest epel-release on RHEL 7 machine
#!/usr/bin/env bash
EPEL_URL_PREFIX=http://dl.fedoraproject.org/pub/epel/7/x86_64/e/
# install any requirements
yum -y install curl
RPM_NAME=$(curl --silent ${EPEL_URL_PREFIX} \
| egrep -oh "epel-release-7-[0-9]*.noarch.rpm" \
| sort -u | head -n 1)
yum -y install ${EPEL_URL_PREFIX}${RPM_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment