centos 如何通过 yum 安装 php72 ?

参考文档:

https://newsn.net/say/centos-php72-yum.html#comments

清理冲突的php:

yum -y remove php*

方法一:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

方法二:

yuminstallepel-release -yrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm


安装php72w及其它相关扩展:

方法一(基本):

yum -yinstallphp72w php72w-cli php72w-fpm php72w-common php72w-devel

方法二(豪华版):

yum -yinstallphp72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml

php-fpm相关服务命令:

systemctlenablephp-fpm.service

systemctl start php-fpm.service


systemctl stop php-fpm.service

systemctl restart php-fpm.service

你可能感兴趣的:(centos 如何通过 yum 安装 php72 ?)