1、配置web服务,访问欢迎界面
服务端
装包:
1、[root@yang ~]# mount /dev/sr0 /mnt 挂载
mount: /mnt: /dev/sr0 already mounted on /run/media/root/RHEL-8-5-0-BaseOS-x86_64.
2、[root@yang ~]# vim /etc/yum.repos.d/base.repo 配置文件
[baseOS]
name=base
baseurl=file:///mnt/BaseOS
gpgcheck=0
[Appstream]
name=AppStream
baseurl=file:///mnt/AppStream
gpgcheck=0
3、[root@yang ~]# yum install httpd -y 下载
4、[root@yang ~]# systemctl start httpd
([root@yang ~]# systemctl start|restart|status|is-active|enable|disable)
5、[root@yang ~]# systemctl stop firewalld #都是临时关闭,重启重新关闭
6、[root@yang ~]# setenforce 0 #都是临时关闭,重启重新关闭
使用selinux永久关闭
[root@yang ~]# vim /etc/selinux/config
![]()
客户端
浏览器输入http://192.168.235.134

对于http协议,只能通过管理员身份运行,普通用户是没有权限的

2、搭建一个web服务器,访问该服务器时显示“hello world”欢迎界面。
[root@yang ~]# systemctl status 显示对应应用程序运行的状态信息
[root@yang ~]# ps -aux | grep httpd
[root@yang ~]# journalctl -xe 显示所有日志系信息
[root@yang ~]# vim /etc/httpd/conf/httpd.conf 默认主配置文件

[root@bogon httpd]# cd /var/www/html/
[root@bogon html]# ll
total 0
[root@bogon html]# vim index.html

[root