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
Check out phpenv into ~/.phpenv
.
$ cd $ git clone git://github.com/phpenv/phpenv.git .phpenv
Add to your for access to the ~/.phpenv/bin
$PATH
phpenv
command-line utility.
$ echo ‘export PATH="$HOME/.phpenv/bin:$PATH"‘ >> ~/.bash_profile
ADD phpenv init to your shell to enable shims and autocompletion.
$ echo ‘eval "$(phpenv init -)"‘ >> ~/.bash_profile
Restart your shell so the path changes take effect. You can now begin using Phpenv.
$ exec $SHELL
$ phpenv install php-5.3.20
$ phpenv install php-6.5.11
- PHP version Switch phpenv global PHP version number
Multi-PHP version coexistence installation under Linux