原因:
CentOS 7下yum安装PHP版本默认是5.4的,但新框架要求PHP版本在7以上,所以把PHP升级一下了。
查看yum的可安装的php版本列表:
yum provides php
开始升级PHP更新源:
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum remove php-common -y
yum install -y php72w php72w-opcache php72w-xml php72w-mcrypt php72w-gd php72w-devel php72w-mysql php72w-intl php72w-mbstring
查看版本:
php -v
PHP 7.2. (cli) (built: Jan ::) ( NTS )
Copyright (c) - The PHP Group
Zend Engine v3.2.0, Copyright (c) - Zend Technologies
with Zend OPcache v7.2.14, Copyright (c) -, by Zend Technologies
安装php fpm:
yum install php72w-fpm
systemctl start php-fpm.service 【启动】
systemctl enable php-fpm.service【开机自启动】
https://www.cnblogs.com/cssfirefly/p/10398463.html