PHP / How to install PHP 5.4 on Ubuntu


1. Install the signing key for the PPA (which also adds the sources to apt):
add-apt-repository ppa:ondrej/php5
If the above command is not available, install it using:
apt-get install python-software-properties
2. Now update the package database and then upgrade the system. As part of upgrading, PHP 5.4 will be installed automatically:
apt-get update
apt-get upgrade
apt-get dist-upgrade
Now, you should have PHP 5.4 installed:
# php -v
PHP 5.4.3-4~precise+1 (cli) (built: May 17 2012 13:00:25)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
Tested on Ubuntu 12.04:  PASSED 
Taken from: http://www.barryodonovan.com/index.php/2012/05/22/ubuntu-12-04-precise-pangolin-and-php-5-4-again

No comments:

Post a Comment