Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save samyranavela/afc6ef8ee32f5c624dfe825ce5c15ed8 to your computer and use it in GitHub Desktop.

Select an option

Save samyranavela/afc6ef8ee32f5c624dfe825ce5c15ed8 to your computer and use it in GitHub Desktop.
# Default extension package
sudo apt-get install libxml2-dev libbz2-dev libmcrypt-dev libreadline-dev libxslt1-dev autoconf -y
# +apxs2
sudo apt-get install apache2-dev -y
# +gd
sudo apt-get install -y libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev libjpeg-dev libjpeg8-dev libjpeg8 libgd-dev libgd3 libwebp-dev
# +opcache
sudo apt-get install libcurl3-openssl-dev -y
# +intl
sudo apt-get install re2c libicu-dev -y
#Reset permission
sudo chmod o+rw /etc/apache2 /usr/sbin/a2enmod
#install new php version
phpbrew install 7.0.8 +default +apxs2 +intl
phpbrew use php-7.0.8
phpbrew ext install gd -- --with-jpeg-dir=/usr/lib --with-freetype-dir=/usr/lib --with-webp-dir=/usr/lib --with-xpm-dir=/usr/lib
phpbrew ext install opcache
phpbrew ext install xdebug
phpbrew ext install soap
#Restore permissions
sudo find /etc/apache2 -type f -exec chmod 644 {} \;
sudo find /etc/apache2 -type d -exec chmod 755 {} \;
sudo chmod 755 /usr/sbin/a2enmod
#Prepare apache module
sudo rm /etc/apache2/mods-enabled/php7.load
sudo cp /etc/apache2/mods-available/php5.conf /etc/apache2/mods-available/php7.conf
#Activate php7 apache module
sudo a2enmod php7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment