Last active
November 21, 2017 19:54
-
-
Save ROMB/657dd8b08ded50debe61 to your computer and use it in GitHub Desktop.
Good way to add epel and remi repos in RHEL/Centos
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
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