php由php 5.4升级到php5.6
1.查看目前php版本
[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
2.删除之前的php
yum remove php-common
3.安装php软件yum仓库
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
4.安装php 5.6版本
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-mysql php56w-intl php56w-mbstring
5.查看刚安装的PHP版本
[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,选择适合的编译方式。
赞 (0)