1.rpm安装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
2.安装php7
[~]# yum install -y php70w
3.安装PHP扩展
[~]# yum install -y php70w-mysql.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64
4.安装php-fpm
[~]# yum install -y php70w-fpm
5.启动php-fpm
[~]# systemctl start php-fpm.service
查看启动状态
[~]# systemctl status php-fpm.service
6.测试
在配置好的Nginx项目目录,编写一个PHP文件,在浏览器打开,若正常输出,则正常。
7.推荐阅读: