如果我们已经安装过了php,首先将原来的php卸载:
yum remove php php-common
由于linux的yum源不存在php7.0,所以我们要更改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
然后安装各种扩展:
yum install php70w php70w-cli php70w-common php70w-devel php70w-embedded php70w-fpm php70w-gd php70w-mbstring php70w-mysql php70w-opcache php70w-pdo php70w-xml