Skip to content

Instantly share code, notes, and snippets.

@miya0001
Last active March 21, 2018 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miya0001/b491a9f79ea8fd93e88067e27286acb3 to your computer and use it in GitHub Desktop.
Save miya0001/b491a9f79ea8fd93e88067e27286acb3 to your computer and use it in GitHub Desktop.
Install PHP 5.6 into the VCCW
#!/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}
@miya0001
Copy link
Author

How to use

$ vagrant ssh
$ curl https://gist.githubusercontent.com/miya0001/b491a9f79ea8fd93e88067e27286acb3/raw/999b791108b439e0d92bcfe9c6cafd6a347263da/install-php56-to-vccw.sh | bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment