操作系统:Centos7
#关闭防火墙
systemctl stop firewalld.service
#禁止防火墙开机启动
systemctl disable firewalld.service
#安装Apache
yum install -y httpd
#启动Apache
systemctl start httpd.service
#设置Apache开机启动
systemctl enable httpd.service
#测试
打开Web Browser
输入localhost
显示Testing 123..
代表安装成功。
www目录:var/www/html
Apache配置文件:/etc/httpd/conf/httpd.conf