系统教程
您现在的位置是:首页>服务器系统>Linux系统内容

centos6下php5.3升级为php7

时间:2018-05-10 出处:未知复制分享人气(次) 【

1、查看版本
[root@web-1 blog]# php -v
No log handling enabled - turning on stderr logging
Created directory: /var/lib/net-snmp/mib_indexes
PHP 5.3.3 (cli) (built: Mar 22 2017 12:27:09) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
 
2、卸载
[root@web-1 blog]# yum remove php-common
[root@web-1 yum.repos.d]# php -v
-bash: /usr/bin/php: No such file or directory
 
3、安装yum源
[root@web-1 yum.repos.d]#  rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
 
4、安装php7
[root@web-1 epel]# yum install php70w php70w-opcache
[root@web-1 epel]# php -v
PHP 7.0.18 (cli) (built: Apr 15 2017 07:29:51) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.18, Copyright (c) 1999-2017, by Zend Technologies
    最新资讯
    热门内容
    小米移动电源能为iPad mini充几次电