Skip to content

Instantly share code, notes, and snippets.

@mikilian
Created July 26, 2016 20:43
Show Gist options
  • Save mikilian/82d85e8f0fc772e8e4faf7bae712f85c to your computer and use it in GitHub Desktop.
Save mikilian/82d85e8f0fc772e8e4faf7bae712f85c to your computer and use it in GitHub Desktop.
Installation script to install php7 on a debian based server
#!/bin/bash
clear
# clone the repository
# (c)kasparsd
git clone https://github.com/kasparsd/php-7-debian.git
cd php-7-debian
# build dependencies and install them
./build.sh
sudo ./install.sh
# fix pathinfo to prevent path/ip leaks via phpinfo
sudo sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /usr/local/php7/lib/php.ini
# remove php7 installation folder to free ~3gb space
rm -rf php-7-debian/
# start php fpm service
sudo /etc/init.d/php7-fpm start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment