[root@syk ~]# php -v PHP 5.4.16 (cli) (built: Apr 12 2018 19:02:01) #目前版本是5.4Copyright (c) 1997-2013 The PHP GroupZend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
yum remove php-common
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-mysql php56w-intl php56w-mbstring
[root@localhost ~]# php -vPHP 5.6.38 (cli) (built: Sep 15 2018 08:16:33) Copyright (c) 1997-2016 The PHP GroupZend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
说明:一般生成环境中,往往是编译安装php,选择适合的编译方式。
联系客服