1、使用yum进行安装
yum install httpd
这里我已经安装了
2、检测是否安装完成
httpd -v
3、启动服务
systemctl start httpd
4、查看服务状态
systemctl statust httpd
5、将Apache 服务设置为开机启动
systemctl enable httpd
6、查看内网地址
ifconfig
7、访问内网地址时,会显示无法访问,很大可能是centos没有关闭防火墙
8、查看防火墙状态
systemctl status firewalld.service
9、关闭防火墙
systemctl stop firewalld.service
10、再次查看防火墙状态
11、将防火墙设置为禁止自启动
systemctl disable firewalld.service
12、再次访问内网地址