php/5/scripts/almalinux-setup.sh

32 lines
895 B
Bash

#!/bin/sh
PHP_LIST="bcmath,brotli,dba,embedded,enchant,
gd,geos,gmp,imap,interbase,
intl,ioncube-loader,ldap,lz4,magickwand,
mbstring,mcrypt,opcache,pear,phurple,
soap,tidy,twig,xcache,xml,
xmlrpc,zstd";
PHP_DEPS="";
# apache2 configurations
SERVER_ROOT="/app";
APP_ROOT="$SERVER_ROOT/htdocs";
LOG_LEVEL="info";
# Setup php flavor
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
for i in $(echo $PHP_LIST | tr "," "\n"); do
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-php-$i ";
done
/usr/bin/dnf install --installroot $ROOTFS \
$PHP_DEPS \
--releasever 8 --setopt install_weak_deps=false --nodocs --nogpgcheck -y;
fi
if [[ "$FLAVOR" == "debug" ]]; then
LOG_LEVEL="debug";
/usr/bin/dnf install --installroot $ROOTFS \
php$PHP_VER_SHORT-php-dbg \
--releasever 8 --setopt install_weak_deps=false --nodocs --nogpgcheck -y;
fi