Created
June 7, 2017 04:02
-
-
Save rickbenetti/3c10fe854abe6b13688f719f20bc1741 to your computer and use it in GitHub Desktop.
Scotch Box - Vagrant - Install php7
This file contains hidden or 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
## Update package list | |
sudo apt-get install python-software-properties | |
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php | |
### Install PHP7 and remove PHP5 | |
sudo apt-get update | |
sudo apt-get purge php5-common -y | |
sudo apt-get install -y \ | |
&& php7.0 \ | |
&& php7.0-fpm \ | |
&& php7.0-mysql \ | |
&& php-curl \ | |
&& libapache2-mod-php7.0 \ | |
&& php7.0-mbstring | |
sudo apt-get --purge autoremove -y | |
### Edit PHP.ini | |
sudo nano /etc/php/7.0/cli/php.ini | |
sudo nano /etc/php/7.0/apache2/php.ini | |
timezone (i.e. date.timezone = America/Sao_Paulo) | |
output_handler = Off | |
zlib.output_compression = On | |
zlib.output_handler = ob_gzhandler | |
upload_max_filesize = 512M | |
post_max_size = 256M | |
memory_limit = 128M | |
file_uploads = On | |
max_execution_time = 180 | |
### Restart apache service | |
sudo a2enmod php7.0 | |
sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment