Created
December 29, 2016 00:45
-
-
Save projectivemotion/444edd36a638684d4f116e557e28bb8b to your computer and use it in GitHub Desktop.
Provision Homestead Vagrant with php5.6
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
#!/bin/bash | |
# save as after.sh in project root then run vagrant up | |
if [ "$USER" != "root" ] ; then | |
sudo /bin/bash "$0" | |
exit 0 | |
fi | |
# install php5.6 | |
apt-get update -y | |
apt-get install -y php5.6-fpm | |
dpkg --get-selections | grep php7.1 | sed 's/7.1/5.6/' | cut -f1 | xargs apt-get install -y | |
cp -b /etc/php/7.1/fpm/pool.d/www.conf /etc/php/5.6/fpm/pool.d/www.conf | |
cp -b /etc/php/7.1/fpm/php.ini /etc/php/5.6/fpm/php.ini | |
sed -i 's/7.1/5.6/' /etc/php/5.6/fpm/pool.d/www.conf /etc/nginx/sites-available/homestead.app | |
systemctl restart php5.6-fpm | |
systemctl restart nginx | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment