1.安装apache
[[email protected] ~]# yum install -y httpd httpd-devel
2.启动apache服务
[[email protected] ~]# systemctl start httpd
3.设置httpd开机启动
[[email protected] ~]# systemctl enable httpd
4.查看服务状态
[[email protected] ~]# systemctl status httpd
5.防火墙开放80端口(或http、https服务)
[[email protected] ~]# firewall-cmd --permanent --zone=public --add-service=http [[email protected] ~]# firewall-cmd --permanent --zone=public --add-service=https [[email protected] ~]# firewall-cmd --reload
6.确认80端口服务开启
[[email protected] ~]# netstat -nultp
7.浏览器确认服务
原文地址:https://www.cnblogs.com/JiaoTou/p/10783107.html
时间: 2024-11-08 21:19:12