Skip to content

Instantly share code, notes, and snippets.

@ROMB
Last active November 21, 2017 19:54
Show Gist options
  • Save ROMB/657dd8b08ded50debe61 to your computer and use it in GitHub Desktop.
Save ROMB/657dd8b08ded50debe61 to your computer and use it in GitHub Desktop.
Good way to add epel and remi repos in RHEL/Centos
if grep -q -i "release 6" /etc/redhat-release
then
echo "RHEL 6 detected"
# Centos 6/RHEL 6
yum localinstall -y http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum localinstall -y http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
fi
if grep -q -i "release 7" /etc/redhat-release
then
echo "RHEL 7 detected"
# Centos 7/RHEL 7
yum localinstall -y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
yum localinstall -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment