CentOS 7升级php5.4到php7.2

原因:
CentOS 7下yum安装PHP版本默认是5.4的,但新框架要求PHP版本在7以上,所以把PHP升级一下了。

 

查看yum的可安装的php版本列表:

1 yum provides php

 

开始升级PHP更新源:

1 rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm 
2 rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
3 yum remove php-common -y  
4 yum install -y php72w php72w-opcache php72w-xml php72w-mcrypt php72w-gd php72w-devel php72w-mysql php72w-intl php72w-mbstring  

 

查看版本:

1 php -v
2 PHP 7.2.14 (cli) (built: Jan 12 2019 12:47:33) ( NTS )
3 Copyright (c) 1997-2018 The PHP Group
4 Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
5     with Zend OPcache v7.2.14, Copyright (c) 1999-2018, 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

posted @ 2019-02-18 22:58  cssfirefly  阅读(6063)  评论(0编辑  收藏  举报
foot