0
点赞
收藏
分享

微信扫一扫

【Node.js】Node.js的安装与配置

梦为马 2024-04-22 阅读 9
apache

一、安装httpd

  1. 查看软件仓库中apache版本列表
dnf provides http 

在这里插入图片描述

  1. 安装apache
dnf install -y httpd 

二、启动http并测试

  1. 查看apache版本号
httpd -v 
  1. 检查配置文件是否正确
httpd -t 
  1. 启动并设置为开机启动
systemctl enable httpd --now 

systemctl enable httpd
systemctl start httpd
  1. 查看httpd服务状态
systemctl status httpd

在这里插入图片描述

  1. 防火墙添加80端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

三、几种检查http服务状态的方法

  1. 方法一:查看端口监听状态
ss -lnp | grep 80 
  1. 方法二:curl命令访问80端口
curl 127.0.0.1:80
  1. 方法三:浏览器访问ip
    在这里插入图片描述
举报

相关推荐

0 条评论