安装Apache

yum install httpd

常用命令

#设置开机启动:
systemctl enable nginx.service
#启动服务:
systemctl start nginx.service
#停止服务:
systemctl stop nginx.service
#重启服务:
systemctl reload nginx.service

安装php

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

//查看 可安装列表
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 nginx.service

11-09 12:48