The server in Alibaba Cloud,
the PHP version that comes with it is version 5.4
Then I needed to update, so I used yum to download the 5.6 version and fixed it, but when I ran the php -v
command, the displayed version was still 5.4
PHP 5.4.45 (cli) (built: Feb 19 2017 16:34:44)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
Then use yum remove php*
to show that the deleted version is php5.6
I want to know how to delete the 5.4 version in the system or how to replace it so that it becomes the 5.6 version
PHPz2017-05-16 13:08:50
You have installed two versions
The default /usr/bin/php is 5.4.45
The simple way is to delete the default php first and then reinstall yum
rm -rf "/usr/bin/php*"