如何在CentOS系统中把PHP 5.3.x更新到PHP 5.4.x

2025-05-07 12:28:58
推荐回答(1个)
回答1:

1.首页安装Webtatic EL6 YUM源
rpm -Uvh
2.停止web服务器
service nginx stop
或者
service httpd stop
3.删除当前的 php 安装 php5.4
yum remove php*
yum install php54w
4.重启web服务器
service php-fpm restart
service nginx start
或者
service httpd restart
5.查看php版本
php -v
PHP 5.4.33 (cli) (built: Sep 19 2014 19:58:27)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies