Created
October 13, 2023 13:00
-
-
Save bouroo/12986edd3c7b6081742eabc1364ed1db to your computer and use it in GitHub Desktop.
php-5.6 on plesk
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
#!/usr/bin/env bash | |
#============================================================================== | |
# title: php56.sh | |
# description: This script automatically installs PHP 5.6 on Plesk RHEL | |
# author: Kawin Viriyaprasopsook <kawin.v@kkumail.com> | |
# usage: bash php56.sh | |
# notes: need `gcc libxml2-devel` packages | |
#============================================================================== | |
dnf -y install gcc libxml2-devel | |
wget https://www.php.net/distributions/php-5.6.40.tar.gz | |
tar -xf php-5.6.40.tar.gz | |
cd php-5.6.40 | |
./configure \ | |
--prefix /usr/local/php56 \ | |
--with-config-file-path=/usr/local/lib/php56.ini \ | |
--enable-fpm \ | |
--with-fpm-group=www-data \ | |
--enable-mbstring \ | |
--enable-opcache \ | |
--enable-zip | |
make && make install | |
cp php.ini-production /usr/local/lib/php56.ini | |
plesk bin php_handler --add -displayname 5.6.40-custom -path /usr/local/php56/bin/php-cgi -clipath /usr/local/php56/bin/php -phpini /usr/local/lib/php56.ini -type fastcgi -id custom-php56-fastcgi | |
# plesk bin php_handler --add -displayname 5.6.40-custom -path /usr/local/php56/sbin/php-fpm -phpini /usr/local/lib/php56.ini -type fpm -id custom-php56-fpm -clipath /usr/local/php56/bin/php -service <PHP FPM service name> -poold <path to php-fpm.d pool folder> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment