一:安装Apache
yum install httpd
修改默认端口:
/etc/httpd/conf/httpd.conf
修改配置: Listen 80 为Listen ip
二:安装PHP
配置yum源
# yum install epel-release
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
安装PHP5.6
yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-gd php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof
三:重启
service httpd restart
访问ip+端口,出现如下页面即安装成功。