1050608_UBUNTU 1204、1404_更新PHP到5.6版

參考來源

  1. 林朝敏老師在LINE的分享
  2. https://joshtronic.com/2014/09/14/upgrade-php-53-to-php-56-on-ubuntu-1204-lts/
  3. http://stackoverflow.com/questions/21390544/installing-apache-2-4-and-php-5-5-on-ubuntu-12-04

先更新 apache2 到2.4

apt-get update && sudo apt-get install python-software-properties
apt-add-repository ppa:ptn107/apache
apt-get install apache2-mpm-worker

再更新php到5.6

sudo add-apt-repository ppa:ondrej/php5-5.6
sudo apt-get update && sudo apt-get dist-upgrade

安裝完成後檢查版本

apache2 -V
php -V
跳至工具列