计网实验七:应用层协议服务配置(DNS,HTTP,FTP)

一.实验要求

1.配置DNS服务器
2.HTTP服务器(可以用配置Tomcat 替代,需要能进入管理界面,即点击"Manager App"图标后能正常跳转到另一个界面)
3.配置FTP服务器

二.实验过程

1.下载VMware

我是用的VMware WorkStation Pro 16.2.3
VMware官网
下了之后别乱动,先下镜像

2.下载镜像

我用的是windows server 2019
不知道是不是官网,反正下得挺慢的

3.新建虚拟机

按照这篇文章来新建虚拟机
我在安装过程中出现过全是黑屏,或者蓝屏,或者提示找不到许可证……如果你们没遇到那就万事大吉,有遇到的话可以在网上搜一下这些问题怎么解决,实在不行就评论问一下。

4.配置DNS

4.1打开服务器管理器

在这里插入图片描述

4.2开始配置

1.把这篇文章的第一、二步做完
先不要关闭cmd命令,在cmd命令下ping刚刚设置的网站名
比如我的网站名叫 www.hsunion.com,你就ping www.hsunion.com
2.创建别名
第四点创建别名记录
3.这个时候应该还是不行,会显示超时,因为还有一步妹有完成
主界面右下角点它
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
改成下面的
注意:
ip:使用下面的ip地址中,ip地址要跟dns服务器一样,就是刚刚新建主机的时候设置的ip地址。下面是我自己设的ip地址,所以跟前面文章的不一样,自己注意一下。
默认网关:前三个数都跟ip的前三个数一样,最后一个数是1
子网掩码:都是255.255.255.0
在这里插入图片描述

有来自……的回复就对了
在这里插入图片描述

5.配置web服务器(http协议)

5.1下载tomcat

下载到自己的电脑上,不是虚拟机上
tomcat配置教程

5.2设置点击manager app跳转到另一界面

首先打开conf/tomcat-users.xml
在这里插入图片描述

5.2.1使用eclipse更改xml文件

如果你有eclipse,且你学过xml文件,很好!
在文件最后加上:
在这里插入图片描述

5.2.2不使用eclipse更改xml文件

不用eclipse打开的方法
妹有eclipse,也妹学过java,也不会xml,你就用记事本打开
在最后加这个(因为我妹用过这种方法,所以我不确定能不能做成)
在这里插入图片描述
下面是我的记事本打开的内容

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">
<!--
  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.

  Built-in Tomcat manager roles:
    - manager-gui    - allows access to the HTML GUI and the status pages
    - manager-script - allows access to the HTTP API and the status pages
    - manager-jmx    - allows access to the JMX proxy and the status pages
    - manager-status - allows access to the status pages only

  The users below are wrapped in a comment and are therefore ignored. If you
  wish to configure one or more of these users for use with the manager web
  application, do not forget to remove the <!.. ..> that surrounds them. You
  will also need to set the passwords to something appropriate.
-->
<!--
  <user username="admin" password="<must-be-changed>" roles="manager-gui"/>
  <user username="robot" password="<must-be-changed>" roles="manager-script"/>
-->
<!--
  The sample user and role entries below are intended for use with the
  examples web application. They are wrapped in a comment and thus are ignored
  when reading this file. If you wish to configure these users for use with the
  examples web application, do not forget to remove the <!.. ..> that surrounds
  them. You will also need to set the passwords to something appropriate.
-->
<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
  <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
  <user username="role1" password="<must-be-changed>" roles="role1"/>
--><!--comment-->
	<role rolename='manager-gui'/><role rolename="admin-gui" /><user
		username="xuchi" password="020509" roles="manager-gui,admin-gui" />
</tomcat-users>

这个时候点击manager app,就会出现以下界面
在这里插入图片描述

6.配置FTP

看第一部分看到输入站点名称,也就是下图这里,接下来看第二篇
在这里插入图片描述
再从第二篇的这里开始看
ftp后续设置:前面已经设置好站点名称了,在这篇文章里面看身份验证和授权信息,验证方法看我下面的验证
搭好之后验证
在这里插入图片描述
在这里插入图片描述

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

迟迟迟迟迟子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值