安装PHP7.2

安装php7.2之前先卸载了5.4版本,可以看我的上一篇卸载PHP5.4

> yum install epel-release [安装所需的依赖]
> yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm [配置CentOS 7.0 yum源]
> yum install yum-utils
> yum-config-manager --enable remi-php72 [查看php72的扩展]
> yum update [更新yum源]
> yum search php72 | more [查看当前的yum中有哪些php扩展]
> yum search php72 | egrep 'fpm|gd|mysql|memcache' [匹配查看某种源的包名]
> yum install php72 [安装php72]
> yum install php72-php-fpm php72-php-gd php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache [安装php的扩展]
> php72 --version [查看php的版本]
> php72 -m [查看php的扩展]
> ps aux | grep php-fpm [查看php-fpm的启动情况]
> systemctl restart php72-php-fpm.service [启动php-fpm的服务 重启:restart 停止:stop]
> systemctl enable php72-php-fpm.service [添加php为开启启动项]
> systemctl status php72-php-fpm.service [查看php-fpm的状态]

php7.2安装之后我再安装nginx ,可以看我的下一篇安装Nginx支持php-fpm

🙂

发表评论

电子邮件地址不会被公开。 必填项已用*标注