因为php7.2是通过php命令控制,而php7.3是使用php73命令,所以根据网上某些教程部署应用时,会出错
上一篇提供了php7.3和apache2.4的部署和配置,再补一篇php7.2的安装,参考连接中有一处链接已失效,已补正
参考文章:https://www.cnblogs.com/lamp01/p/10101659.html
配置源,以下两种方式均可
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
或
yum install epel-release -y rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
移除php历史版本,这里跳过
安装扩展,有需要的扩展可以自行添加
yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
自启和启动
systemctl enable php-fpm.service systemctl start php-fpm.servic
标签:rpm,php7.2,Centos7,yum,https,php,php72w From: https://www.cnblogs.com/thinkboy/p/16885423.html