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:

No comments:

Post a Comment