Multi-PHP version coexistence installation under Linux

Source: Internet
Author: User
Tags install php

We know that Apache + PHP is a more classic collocation, but both will be upgraded, we have experienced PHP two times to upgrade version.

The general is to re-download the new version of PHP, and then compile the installation. It's all very tedious. Do you have automatic installation tools?

Of course, PHPEVN is the PHP multi-version management tool under Linux. His installation is described below.

Installation Method Reference Https://github.com/phpenv/phpenv

   First Git installs
$ yum Install git

  1. Check out phpenv into ~/.phpenv .

     $ cd $ git clone git://github.com/phpenv/phpenv.git .phpenv
  2. Add to your for access to the ~/.phpenv/bin $PATH phpenv command-line utility.

     $ echo ‘export PATH="$HOME/.phpenv/bin:$PATH"‘ >> ~/.bash_profile
  3. ADD phpenv init to your shell to enable shims and autocompletion.

     $ echo ‘eval "$(phpenv init -)"‘ >> ~/.bash_profile
  4. Restart your shell so the path changes take effect. You can now begin using Phpenv.

     $ exec $SHELL
  5. $ phpenv install php-5.3.20
  6. $ phpenv install php-6.5.11
  7. PHP version Switch phpenv global PHP version number

Multi-PHP version coexistence installation under Linux

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.