Linux搭建基于Apache的HTTP服务器

Linux搭建基于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

 

客户机端

 

 

posted @ 2019-07-07 20:40  长沙众元云计算实验室  阅读(937)  评论(0编辑  收藏  举报