mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
setup-yum-repo: Add prod flag for doing IUS install on CentOS.
This commit is contained in:
@@ -2,12 +2,28 @@
|
||||
set -x
|
||||
set -e
|
||||
|
||||
is_prod=false
|
||||
args="$(getopt -o '' --long prod -- "$@")"
|
||||
eval "set -- $args"
|
||||
while true; do
|
||||
case "$1" in
|
||||
--prod) is_prod=true; shift;;
|
||||
--) shift; break;;
|
||||
esac
|
||||
done
|
||||
|
||||
is_centos=false
|
||||
is_rhel=false
|
||||
is_rhel_registered=false
|
||||
if [ -e /etc/centos-release ]; then
|
||||
is_centos=true
|
||||
yum install -y epel-release
|
||||
|
||||
if [ "$is_prod" = true ]; then
|
||||
# IUS is needed for installing python36u-mod_wsgi on prod env
|
||||
yum localinstall -y https://centos7.iuscommunity.org/ius-release.rpm
|
||||
fi
|
||||
|
||||
elif grep -q "Red Hat" /etc/redhat-release; then
|
||||
is_rhel=true
|
||||
yum localinstall -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
@@ -18,6 +34,7 @@ elif grep -q "Red Hat" /etc/redhat-release; then
|
||||
subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"
|
||||
fi
|
||||
fi
|
||||
|
||||
yum update -y
|
||||
|
||||
# "Development Tools" is the equivalent of build-essential
|
||||
|
||||
Reference in New Issue
Block a user