『实用』网络共享目录的搭建--网站基础

前提:

本地仓库的搭建或主机dnf可上网

一、安装httpd

提供此协议的软件: Apache
软件包名称 httpd
共享位置 /var/www/html
安装命令 dnf install httpd -y

[root@node26 mnt]# dnf whatprovides httpd
[root@node26 mnt]# dnf install httpd-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64 -y

在这里插入图片描述

二、启用共享软件Apache

systemctl stop firewalld 立即停止防火墙

[root@node26 mnt]# systemctl stop firewalld.service 

systemctl disable firewalld 开机禁用防火墙

[root@node26 mnt]# systemctl disable firewalld.service 
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@node26 mnt]# 

systemctl disable --now firewalld 等于上面两条,开机禁用并立即停用防火墙
systemctl enable --now httpd 开机启动并立即开启httpd

[root@node26 mnt]# systemctl enable --now httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.

三、建立共享目录

mkdir /var/www/html/westos

[root@node26 mnt]# mkdir /var/www/html/westos
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值