1

1.查看CentOS版本号

[root@localhost etc]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

2.rpm安装php7相应的yum源

[root@localhost etc]
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
获取https://mirror.webtatic.com/yum/el7/webtatic-release.rpm  
警告:/var/tmp/rpm-tmp.h2HeqS: 头V4 RSA/SHA1 Signature, 密钥 ID 62e74ca5:  NOKEY 
错误:依赖检测失败:     epel-release >= 7 被 webtatic-release-7-3.noarch 需要

3.需要先安装epel-release

[root@localhost etc]# yum -y install epel-release

4.重复第二步,安装php7相应的yum源

5.安装php7

[root@localhost etc]# yum install php70w

6.查看php版本

[root@localhost etc]# php -v
PHP 7.0.14 (cli) (built: Dec 10 2016 11:35:27) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

Donne
694 声望25 粉丝

知其然,知其所以然。


引用和评论

0 条评论