Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nguyenbathanh/c671d5187b4461ad89194e4744de80bf to your computer and use it in GitHub Desktop.
Save nguyenbathanh/c671d5187b4461ad89194e4744de80bf to your computer and use it in GitHub Desktop.
Update PHP 5.x to PHP 5.6 on Ubuntu 14.04
#!/bin/sh
# In case df shows >90% for /boot run:
#sudo apt-get autoremove
# Add repository
sudo add-apt-repository ppa:ondrej/php
# Install required packages
sudo apt-get update
sudo apt-get -y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip
# Switch Apache PHP module
sudo a2dismod php5
sudo a2enmod php5.6
# Restart Apache
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment