# Windows Server 部署 IIS

#### 博客作者：联系请[点击](https://hezhiqiang.gitbook.io/about-the-author/lian-xi-zuo-zhe)，搬运不易，希望请作者喝咖啡，可以点击联系[博客作者](https://hezhiqiang.gitbook.io/about-the-author/lian-xi-zuo-zhe)

## 概述

本文介绍在Windows Server 系统上如何安装IIS和FTP服务。

## 详细描述

根据Windows系统不同版本分别进行了Windows Server 2008、Windows Server 2012及之后版本的安装说明，步骤如下。

> **说明**：Windows Server2012及之后的版本指Windows Server 2012、Windows Server 2016和Windows Server 2019版本。更多有关不同版本安装IIS和FTP服务的教程，请参考如下微软官方文档。
>
> * [Windows Server 2008或Windows Server 2008 R2中安装IIS 7](https://docs.microsoft.com/zh-cn/iis/install/installing-iis-7/installing-iis-7-and-above-on-windows-server-2008-or-windows-server-2008-r2)。
> * [Windows Server 2012 R2中安装IIS 8.5](https://docs.microsoft.com/zh-cn/iis/install/installing-iis-85/installing-iis-85-on-windows-server-2012-r2)。
> * [Windows Server 2016的Nano Server中安装IIS 10.0](https://docs.microsoft.com/zh-cn/iis/get-started/whats-new-in-iis-10/introducing-iis-on-nano-server)。

### Windows Server 2008安装步骤

1. 在服务器桌面单击**服务器管理器**。
2. 右键单击**角色**，然后单击**添加角色**，再单击**下一步**。
3. 勾选**Web服务器 (IIS)**，单击**下一步**。
4. 单击**下一步**，勾选**FTP 服务器**与**FTP 管理控制台**。
5. 勾选**ASP.NET**，即选择需要的环境，单击**下一步**，再次单击**下一步**。
6. 单击**安装**。
7. 系统提示**安装成功**后，单击**关闭**。
8. 单击服务器左下角的**开始**>**管理工具**>**Internet 信息服务 (IIS) 管理器**。
9. 单击**网站**>**Default Web Site** 可以查看IIS的默认站点。
10. 单击**浏览 \*：80 (http)**，可以在浏览器中打开IIS的默认站点。
11. 至此，您的IIS安装完成。

![](https://onekb.oss-cn-zhangjiakou.aliyuncs.com/1264092/5500088b-2a3c-4263-8438-ba35ff547c30.png)

![](https://onekb.oss-cn-zhangjiakou.aliyuncs.com/1264092/df589c60-2543-4b05-a89e-2cad325c43c7.png)

![](/files/-McMGmjAE0OxZchnClbS)

### Windows Server 2012及之后的版本安装步骤

1. 打开**服务器管理器**，单击**管理**>**添加角色和功能**。
2. **服务器角色**选择**Web服务器(IIS)**，单击**下一步**。
3. **功能**需根据情况选择，这里勾&#x9009;**.Net Framework 3.5 功能**，单击**下一步**。
4. **角色服务**选择对应的**安全性**选项（如果您暂时不知道需要勾选哪些项目，建议您勾选全部**安全性**内容），单击**下一步**。
5. 勾选**FTP 服务器**，**FTP 服务**。请注意，您需要勾选服务器必要的**管理工具**，单击**下一步**，然后单击**安装**。
6. 开始安装，耐心等待即可。
7. 安装完毕后，打开Windows 2012的服务器管理器，单击**工具**>**Internet Information Service (IIS)管理器**。
8. 管理器中显示**程序池**和**网站**，表示您的IIS已经成功安装。

![](http://gtms04.alicdn.com/tps/i4/TB1V5AtHXXXXXcjXpXXJy1J_VXX-800-567.jpg#alt=security)

{% hint style="danger" %}
注意：关于IIS和FTP服务安全加固，请参见FTP匿名登录或弱口令漏洞及服务加固。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hezhiqiang.gitbook.io/about-the-author/yun-wei-huan-jing-da-jian/windows-iis-fu-wu-jiao-cheng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
