1. 先yum install httpd 安装apache
2.添加php7rpm源
yum install epel-release
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm && rpm
-Uvh remi-release-7.rpm
2. 安装 PHP 7.1
yum –enablerepo=remi-safe -y install php71
显示版本:
php71 -v
安装选择安装
yum install php71-php-mcrypt php71-php-mcrypt php71-php-json
php71-php-mbstring php71-php-xml php71-php-soap php71-php-xmlrpc
php71-php-simplexml php71-php-curl php71-php-mysqlnd
3. 安装 PHP-FPM
yum –enablerepo=remi-safe -y install php71-php-fpm
启动php71-php-fpm
systemctl start php71-php-fpm
systemctl status php71-php-fpm
service systemctl enable php71-php-fpm
重启apache
systemctl start httpd.service