Centos7 yum安装php7

in Linux with 0 comment

1、如果之前已经安装我们先卸载一下

yum -y remove php*

2、由于linux的yum源不存在php7.x,所以我们要更改yum源

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

3、yum 安装php72w和各种拓展,选自己需要的即可

yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml //请复制完整

4、最后重启网页服务器

Responses