linux升級php方法
#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
升級成功
#以上是linux升級php方法的詳細內容。更多資訊請關注PHP中文網其他相關文章!