Upgrade PHP from 5.3 to 5.5 in Ubuntu 12.04 LTS

Source: Internet
Author: User
In Ubuntu 12.04 LTS, use

sudo apt-get install PHP5-FPM

The PHP version installed is PHP5.3, if you want to use the YII2 or laravel framework, the PHP version is at least 5.4+, so upgrade.

Upgrade steps

Initialize the operation:

sudo apt-get updatesudo apt-get install python-software-properties

Update the PPA Source:

sudo add-apt-repository ppa:ondrej/php5

If you just want to upgrade to 5.4, execute the following command:

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

Next, perform updates and upgrades:

sudo apt-get updatesudo apt-get dist-upgrade

Executing the command php-v will find that the update was successful.

Note 1

If the previous Nginx configured listening 9000 port to process PHP, then to listen to the UNIX socket, otherwise the PHP page will not be opened correctly. Upcoming

Fastcgi_pass 127.0.0.1:9000;

Change into

Fastcgi_pass Unix:/var/run/php5-fpm.sock;

NOTE 2

The difference between upgrade and Dist-upgrade:

Dist-upgrade will identify and deal with situations where dependency changes are made, and upgrade does not deal with this situation.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.