How to Upgrade / Install PHP 5.4.0 Under Ubuntu 11.10/12.04

Ubuntu
回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

How to Upgrade / Install PHP 5.4.0 Under Ubuntu 11.10/12.04

文章 yehlu »

http://www.upubuntu.com/2012/03/how-to- ... under.html

PHP 5.4.0 is released recently by the PHP development team. This new release encompasses many new features and bug fixes (more than 100 bug fixes) with improvements in terms of performance and memory footprint. Here are the main features in PHP 5.4.0:

Traits (a method of code reuse)
Shortened Array Syntax
A Built-in web server for testing purposes, etc.
For more information about PHP 5.4.0, check this page. In this tutorial we will see how to install / upgrade to PHP 5.4.0 under a system running Ubuntu 11.10 (Oneiric Ocelot) and Ubuntu 12.04 (Precise Pangolin) via PPA.

PHP 5.4.0 Installation

Open the terminal and run this sequence of commands for Ubuntu 11.10/12.04:

sudo add-apt-repository ppa:ondrej/php5


sudo apt-get update


sudo apt-get install php5

For Ubuntu 10.04 LTS, run the following commands (Thanks to Ivan Castellanos for the extra tip):


sudo echo "deb http://ppa.launchpad.net/ondrej/php5/ubuntu lucid main" >> /etc/apt/sources.list


sudo echo "deb-src http://ppa.launchpad.net/ondrej/php5/ubuntu lucid main" >> /etc/apt/sources.list


sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C


sudo apt-get update


sudo apt-get install php5


You can check if PHP 5.4.0 is successfully installed with this command:

php5 -v

That's it!
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Re: How to Upgrade / Install PHP 5.4.0 Under Ubuntu 11.10/12

文章 yehlu »

yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

12.04

文章 yehlu »

php 5.4

代碼: 選擇全部

sudo add-apt-repository ppa:ondrej/php5-oldstable
php 5.5

代碼: 選擇全部

sudo add-apt-repository ppa:ondrej/php5
回覆文章

回到「Ubuntu」