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.rpmphp

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 -vmysql

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
升級成功web

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

相關文章
相關標籤/搜索