1添加mirror
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
2 yum 安装 php7
yum install php70w
yum install php70w-common
yum install php70w-fpm
yum install php70w-pdo
yum install php70w-xml
yum install php70w-mbstring
(因为我跑的是laravel,所以需要以上的一些扩展,其它请自行安装,如果需要其他扩展,请使用yum search php70w)
安装完后运行
service php-fpm restart
service nginx restart
错误日志请查看/var/log/php-fpm/www-error.log