CentOS7升级php5.4到php7.2
原因:
CentOS7下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.14 (cli) (built: Jan 12 2019 12:47:33) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.14, Copyright (c) 1999-2018, by Zend Technologies
安装php fpm:
yum install php72w-fpm #启动php-fpm systemctl start php-fpm.service #设置开机启动php-fpm systemctl enable php-fpm.service
<< 上一篇
下一篇 >>