第四天
web服务器
WWW
www简介
www所用的协议
WEB服务器 www web http apache http server tomcat nginx IIS
主要数据
HTTP协议请求的工作流程
www服务器的基本配置
1.挂载
[root@A ~]# mount /dev/sr0 /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.
2.配置yum源
3.使用dnf/yum安装
[root@A ~]# dnf install httpd -y
4.启动服务
[root@A ~]# systemctl start httpd.service --- 启动程序
[root@A ~]# systemctl stop httpd.service --- 关闭程序
查看状态
[root@A ~]# systemctl is-active httpd
active --- 显示为avtive,表示程序已经启动
或者
[root@A ~]# systemctl status httpd
Loaded 表示文件所在路径
Active 表示状态
Docs 表示文本帮助文件
Main PID 表示进程号
按q退出
5.创建网页文件
[root@A ~]# cd /var/www/html
[root@A html]# ll
total 0
[root@A html]# vim index.html
6.关闭防火墙
[root@A html]# systemctl stop firewalld
7.关闭SElinux
[root@A html]# setenforce 0
8.开机禁用防火墙
[root@A html]# systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
9.配置SElinux
[root@A html]# vim /etc/selinux/config
查看状态
[root@A html]# getenforce
Permissive
10.输入本机ip
[root@A html]# echo one one three > abc.html