php 5.4 升级到 php 5.6

1.查看目前 PHP 版本

[root@localhost ~]# php -v    
PHP 5.4.16 (cli) (built: Apr 12 2018 19:02:01)   
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

2.删除之前的 PHP

[root@localhost]# yum remove php-common

3.安装 PHP 软件 yum 仓库

[root@localhost ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
[root@localhost ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

4.安装 PHP 5.6 版本

[root@localhost ~]# yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-mysql php56w-intl php56w-mbstring

5.查看刚安装的 PHP 版本

[root@localhost ~]# php -v
PHP 5.6.38 (cli) (built: Sep 15 2018 08:16:33) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies