linux升级php至5.6

1 查看终端当前php版本
php -v
会反馈以下信息:
PHP 5.4.35 (cli) (built: Nov 14 2014 07:04:10) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
2 升级软件仓库
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
3 yum remove php-common
会有一个提示 y/n: 输入 yes
4 安装php5.6
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring
5 重新启动httpd
service httpd restart
查看是否是最新版本
php -v

PHP 5.6.24 (cli) (built: Jul 21 2016 14:27:54)
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
升级成功

来源:http://blog.csdn.net/xkweiguang/article/details/52325876

posted @ 2018-01-17 11:25  侠岚之弋痕夕  阅读(4013)  评论(0编辑  收藏
Where is the starting point, we don't have a choice, but the destination where we can pursue!