首先进入安装之后的目录中
[root@l ~]# cd /usr/local/httpd/bin
执行命令
执行./apachectl -f /usr/local/httpd/conf/httpd.conf 或./apachectl start命令
[root@l bin]# ./apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::6de9:6d50:2cc3:a0d9. Set the 'ServerName' directive globally to suppress this message
查看一下端口
查看一下监听端口。
[root@l bin]# netstat -anput | grep httpd
tcp6 0 0 :::80 :::* LISTEN 28883/httpd
设置防火墙
此时需要确保httpd能通过防火墙
[root@l bin]# firewall-cmd --permanent --add-service=http
success
[root@l bin]# firewall-cmd --reload
success
此时就可以通过ip访问服务器

本文档详细介绍了如何进入Apache安装目录,启动Apache服务器,检查端口监听情况,并通过防火墙命令永久开启HTTP服务,确保可以通过IP地址访问服务器。





