安装Apache
yum install httpd
常用命令
#设置开机启动:systemctl enable httpd.service#启动服务:systemctl start httpd.service#停止服务:systemctl stop httpd.service#重启服务:systemctl reload httpd.service
安装php
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm//查看 可安装列表yum search php# php7安装以及扩展yum install php71w php71w-fpm php71w-cli php71w-common php71w-devel php71w-gd php71w-pdo php71w-mysql php71w-mbstring php71w-bcmath# 或者安装php5.6以及扩展yum install php56w php56w-fpm php56w-cli php56w-common php56w-devel php56w-gd php56w-pdo php56w-mysql php56w-mbstring php56w-bcmath# 重启httpd服务systemctl reload httpd.service