Last active
March 21, 2018 12:51
-
-
Save miya0001/b491a9f79ea8fd93e88067e27286acb3 to your computer and use it in GitHub Desktop.
Install PHP 5.6 into the VCCW
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 | |
set -ex | |
PHP_VERSION=${1-"7.0"} | |
sudo apt update -y | |
sudo apt install \ | |
php${PHP_VERSION} \ | |
php${PHP_VERSION}-cli \ | |
php${PHP_VERSION}-common \ | |
php${PHP_VERSION}-curl \ | |
php${PHP_VERSION}-dev \ | |
php${PHP_VERSION}-gd \ | |
php${PHP_VERSION}-json \ | |
php${PHP_VERSION}-mbstring \ | |
php${PHP_VERSION}-mysql \ | |
php${PHP_VERSION}-opcache \ | |
php${PHP_VERSION}-readline \ | |
php${PHP_VERSION}-xml \ | |
php${PHP_VERSION}-zip -y | |
sudo /usr/sbin/a2dismod php* | |
sudo /usr/sbin/a2enmod php${PHP_VERSION} | |
sudo service apache2 restart | |
sudo update-alternatives --set php /usr/bin/php${PHP_VERSION} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use