将源码安装的软件添加到环境变量

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

首先进入安装之后的目录中

[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访问服务器

在这里插入图片描述

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值