Home >Backend Development >PHP Problem >Linux upgrade php method
linux upgrade php method
1 Check the current php version of the terminal
php -v
will give the following feedback Information:
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 Upgrade software warehouse
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
There will be a prompt y/n: Enter yes
4 Install php5.6
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring
5 Restart httpd
service httpd restart
Check whether it is the latest version
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
Upgrade successful
The above is the detailed content of Linux upgrade php method. For more information, please follow other related articles on the PHP Chinese website!