centos7学习第五期——搭建基于Apache的HTTP服务器

学习目标:

通过本实验掌握基于Linux的WWW服务器搭建。

标题操作步骤:

1、安装http服务

2、防火墙放通http服务

3、编辑测试网页

4、开启http服务,浏览测试

参考命令:

1、安装http

Apache(阿帕奇)是Linux平台的http软件

[root@server dhcp]# yum install httpd -y

在这里插入图片描述

已安装则对比软件仓库中的版本,如果版本相同则提示nothing to do

2、防火墙放通http服务

在这里插入图片描述

permanent 为添加一条永久规则,重启依然生效

reload 为重启防火墙

3、编辑测试网页
在这里插入图片描述

Apache默认存放首页的位置为/var/www/html

在这里插入图片描述

4、开启httpd服务,并浏览测试

服务器端

[root@server html]# systemctl enable httpd

[root@server html]# systemctl start httpd

客户机端
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_37257758/article/details/94566385