OS:CentOs 7
1.查看当前 PHP 版本
[root@disconf zbox]# php -v
PHP 5.4.16 (cli) (built: Apr 12 2018 19:02:01)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
2.查看当前 PHP 相关的安装包,删除之
yum list installed | grep php
yum remove php
yum remove php-*
3.更换 RPM 源
#Centos 5.X:
rpm -Uvh
#CentOs 6.x:
rpm -Uvh
#CentOs 7.X:
rpm -Uvh
rpm -Uvh
4.安装新的版本
yum install -y php71w php71w-cli php71w-common php71w-devel php71w-embedded php71w-fpm php71w-gd php71w-mbstring php71w-mysqlnd php71w-opcache php71w-pdo php71w-xml php71w-ldap php71w-mcrypt
5.再次检查版本
[root@disconf zbox]# php -v
PHP 7.1.27 (cli) (built: Mar 10 2019 16:23:55) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.27, Copyright (c) 1999-2018, by Zend Technologies
-- The End --
阅读(5874) | 评论(0) | 转发(0) |