Use local php. Part 1

This commit is contained in:
Alexey Berezhok
2025-01-13 23:21:50 +03:00
parent 8e2a9e1f42
commit 66e574dd33
6 changed files with 179 additions and 44 deletions

View File

@@ -113,12 +113,7 @@ if ! echo "$DB_SYSTEM" | grep -w 'pgsql' > /dev/null; then
fi
# Install php packages
if [ -f '/etc/redhat-release' ]; then
dnf install -q -y $mph > /dev/null 2>&1 &
else
apt-get -qq update
apt-get -y -qq -o Dpkg::Options::="--force-confold" install $mph > /dev/null 2>&1 &
fi
dnf install -q -y $mph > /dev/null 2>&1 &
BACK_PID=$!
# Check if package installation is done, print a spinner
@@ -136,20 +131,15 @@ echo
# Check if installation was successful
if [ ! -f "$php_fpm" ]; then
echo "ERROR: Installation failed, please run the following command manually for debugging:"
if [ -f '/etc/redhat-release' ]; then
echo "dnf install $mph"
else
echo "apt-get install $mph"
fi
echo "dnf install $mph"
fi
if [ -f '/etc/redhat-release' ]; then
result_alt_php=$(alternatives --display php | grep /usr/bin/php$version)
if [ -z "$result_alt_php" ]; then
alternatives --install /usr/bin/php php /usr/bin/php$version 1 > /dev/null 2>&1
fi
result_alt_php=$(alternatives --display php | grep /usr/bin/php$version)
if [ -z "$result_alt_php" ]; then
alternatives --install /usr/bin/php php /usr/bin/php$version 1 > /dev/null 2>&1
fi
# Check if required modules for apache2 are enabled
if [ "$WEB_SYSTEM" = "apache2" ]; then
if [ -f /etc/redhat-release ]; then