部署 Office Web Apps Server

 

适用于: Office Web Apps Server

上一次修改主题: 2017-10-05

摘要: 介绍了如何在本地部署 Office Web Apps Server 以供 SharePoint 2013 和 Lync Server 2013 使用。

目标用户: IT 专业人员

请注意,本文介绍了如何为企业安装 Office Web Apps Server。如需 Office 或 Office Web Apps 个人副本方面的帮助,请访问 https://support.office.com

部署 Office Web Apps Server 涉及安装某些必备软件和运行一些 Windows PowerShell 命令,但总的来说,此过程设计得相当简单。本文将指导您完成准备服务器的过程,并提供了配置 Office Web Apps Server 场的 Windows PowerShell 命令。

本文内容:

  • 观看视频了解如何完成

  • 在开始之前,请查看这些资源

  • 准备服务器以运行 Office Web Apps Server

  • 部署 Office Web Apps Server 场

  • 如果您看到“500 Web 服务异常”或“500.21 – 内部服务器错误”消息

观看视频了解如何完成

观看以下视频了解如何在测试环境中设置 Office Web Apps Server。您还可以查看如何配置 SharePoint 2013 以使用 Office Web Apps Server 的预览。

>在测试环境中设置 Office Web Apps Server

在开始之前,请查看这些资源

在开始之前,请确保您已查看这些资源:

备注

可以使用鼠标、键盘快捷方式或触摸完成所有 Office 2013 套件中的任务。若要了解如何结合使用 Office 产品和服务与键盘快捷方式和触摸,请参阅 Keyboard shortcuts(键盘快捷方式)和 Office 触摸指南

准备服务器以运行 Office Web Apps Server

在所有服务器上执行以下过程来运行 Office Web Apps Server。

图:准备服务器以运行 Office Web Apps Server 的步骤

准备服务器以运行 Office Web Apps Server 的三个主要步骤。

步骤 1:为 Office Web Apps Server 安装必备软件

Windows Server 2008 R2、Windows Server 2012 和 Windows Server 2012 R2 的必备软件略有不同,请选择以下相应过程来为您的操作系统安装正确的必备软件。

在 Windows Server 2008 R2 上

  1. 安装以下软件:

  2. 以管理员身份打开 Windows PowerShell 提示符,然后运行以下命令示例来安装必需的角色和服务。

    Import-Module ServerManager
    

    然后运行此命令:

    Add-WindowsFeature Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,Web-Security,Web-Windows-Auth,Web-Filtering,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Console,Ink-Handwriting,IH-Ink-Support,NET-Framework,NET-Framework-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-Win-CFAC
    

    如果出现提示,请重新启动服务器。

在 Windows Server 2012 上

  1. 以管理员身份打开 Windows PowerShell 提示符,然后运行此命令示例来安装必需的角色和服务。

    Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,InkandHandwritingServices,NET-Framework-Features,NET-Framework-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45
    

    如果出现提示,请重新启动服务器。

在 Windows Server 2012 R2 上

  1. 安装以下软件:

  2. 以管理员身份打开 Windows PowerShell 提示符,然后运行此命令示例来安装必需的角色和服务。

    Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,InkandHandwritingServices,NET-Framework-Features,NET-Framework-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45
    

    如果出现提示,请重新启动服务器。

步骤 2:安装 Office Web Apps Server 和相关更新

在将运行 Office Web Apps Server 的所有服务器上完成以下步骤。

  1. 批量许可服务中心 (VLSC) 下载 Office Web Apps Server。必须根据批量许可协议拥有 Office Professional Plus 2013、Office Standard 2013 或 Office for Mac 2011 的许可证,才能下载 Office Web Apps Server。下载位置位于 VLSC 门户的 Office 产品下方。

  2. 执行下列操作之一:

    • 对于 Windows Server 2012 或 Windows Server 2012 R2,直接打开 .img 文件,并运行 Setup.exe

    • 对于 Windows Server 2008 R2 SP1,使用可装入或提取 .img 文件的程序,然后运行 Setup.exe

  3. 在“阅读 Microsoft 软件许可条款”页上,选择“我接受此协议的条款”,然后选择“继续”。

  4. 在“选择文件位置”页上,选择要将 Office Web Apps Server 文件安装到的文件夹(例如,C:\Program Files\Microsoft Office Web Apps),然后选择“立即安装”。如果您指定的文件夹不存在,安装程序将为您创建它。

    我们建议在系统驱动器上安装 Office Web Apps Server。

  5. 在安装程序安装完 Office Web Apps Server 后,选择“关闭”。

  6. 下载并安装 Office Web Apps Server SP1(对于 Windows Server 2012 和 Windows Server 2008 R2 SP1,此为建议操作。对于 Windows Server 2012 R2,必须这样操作。)

    备注

    如果您打算以后再应用 Office Web Apps Server SP1,请按照将软件更新应用到 Office Web Apps Server 中的说明来操作。

  7. 查看 Office、Office 服务器和相关产品的 TechNet 更新中心上的列表,检查是否有最新的 Office Web Apps Server 更新。

    备注

    如果还没有安装 Office Web Apps Server SP1,请参阅 KB2810007

步骤 3:为 Office Web Apps Server 安装语言包

利用 Office Web Apps Server 2013 语言包,用户可以从 SharePoint 2013 文档库、Outlook Web Access(作为附件预览)以及 Lync 2013(作为 PowerPoint 广播)中以多种语言查看基于 Web 的 Office 文件。若要了解有关语言包的工作方式的详细信息,请参阅规划 Office Web Apps Server 的语言包

若要安装语言包,请按以下步骤进行操作。

  1. Microsoft 下载中心下载 Office Web Apps Server 语言包。

  2. 运行 WebAppsServerLP_en-us_x64.exe

  3. 在 Office Web Apps Server 语言包 2013 向导中的“阅读 Microsoft 软件许可条款”页上,选择“我接受此协议的条款”,然后选择“继续”。

  4. 在安装程序安装完 Office Web Apps Server 后,选择“关闭”。

重要

  • 若要在创建 Office Web Apps Server 场后安装语言包,您必须从服务器场中删除一个服务器,将语言包安装在该服务器上,然后再将该服务器添加回服务器场。

  • 要使语言包正常工作,您需要在服务器场中的所有服务器上进行安装。

部署 Office Web Apps Server 场

按照下面三节中任意一节的程序进行操作,具体取决于您想创建的 Office Web Apps Server 场类型。

提示

如果 Windows PowerShell 在您运行时无法识别New-OfficeWebAppsFarm cmdlet,您可能需要导入 OfficeWebApps 模块。请使用此命令:
Import-Module -Name OfficeWebApps

部署使用 HTTPS 的、包含一台服务器的 Office Web Apps Server 场

如果您仅将 Office Web Apps Server 部署用于测试或内部使用,并且您不需要向 Lync Server 2013 提供 Office Web Apps Server 功能,则此程序适合您。您将安装使用 HTTP 的、包含一台服务器的 Office Web Apps Server 场。您不需要证书或负载平衡器,但需要不运行任何其他服务器应用程序的专用物理服务器或虚拟机实例。

可以使用此 Office Web Apps Server 场向 SharePoint 2013 提供 Office Web Apps 功能。

图:部署 Office Web Apps Server 的步骤

部署包含一台服务器的 Office Web Apps Server 场的三个主要步骤。

步骤 1:创建 Office Web Apps Server 服务器场

使用 New-OfficeWebAppsFarm 命令创建一个包含一台服务器的新 Office Web Apps Server 场,如以下示例中所示。

New-OfficeWebAppsFarm -InternalURL "https://servername" -AllowHttp -EditingEnabled

参数

  • –InternalURL 是运行 Office Web Apps Server 的服务器的名称,例如 https://servername

  • –AllowHttp 配置要使用 HTTP 的场。

  • 使用 –EditingEnabled,可以在与 SharePoint 2013 结合使用的 Office Web Apps 中启用编辑。Lync Server 2013 不使用此参数,因为相应主机不支持编辑。

New-OfficeWebAppsFarm 中描述了配置翻译服务、代理服务器、剪贴画支持以及联机查看器的其他参数。

如果您看到“500 Web 服务异常”或“500.21 – 内部服务器错误”消息

步骤 2:验证是否成功创建了 Office Web Apps Server 服务器场

在创建服务器场后,将在 Windows PowerShell 提示符中显示有关服务器场的详细信息。若要验证是否正确安装并配置了 Office Web Apps Server,请使用 Web 浏览器访问 Office Web Apps Server 发现 URL,如下面的示例所示。发现 URL 是您在配置 Office Web Apps Server 服务器场时指定的 InternalUrl 参数,后跟 /hosting/discovery,例如:

https://servername/hosting/discovery

如果 Office Web Apps Server 按预期运行,您应该在 Web 浏览器中看到 Web 应用程序开放平台接口 (WOPI) 协议发现 XML 文件。该文件的前几行应类似以下示例。

<?xml version="1.0" encoding="utf-8" ?> 
- <wopi-discovery>
- <net-zone name="internal-http">
- <app name="Excel" favIconUrl="https://servername/x/_layouts/images/FavIcon_Excel.ico" checkLicense="true">
<action name="view" ext="ods" default="true" urlsrc="https://servername/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" /> 
<action name="view" ext="xls" default="true" urlsrc="https://servername/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" /> 
<action name="view" ext="xlsb" default="true" urlsrc="https://servername/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" /> 
<action name="view" ext="xlsm" default="true" urlsrc="https://servername/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" /> 

步骤 3:配置主机

场现在可以通过 HTTP 向主机提供 Office Web Apps 功能。若要详细了解如何配置主机,请参阅为 SharePoint 2013 配置 Office Web Apps

部署使用 HTTPS 的、包含一台服务器的 Office Web Apps Server 服务器场

对于大多数生产环境中,我们强烈建议对其安全功能使用 HTTPS。同样,如果您要向 Lync Server 2013 提供 Office Web Apps Server 功能,则需要 HTTPS,这样用户便可在浏览器中查看 PowerPoint 广播。此处将介绍如何安装使用 HTTPS 的、包含一台服务器的 Office Web Apps Server 场。您需要按照使用 HTTPS 保护 Office Web Apps Server Preview 通信中所述在服务器上安装证书。

此 Office Web Apps Server 场将向 SharePoint 2013 和 Lync Server 2013 提供 Office Web Apps 功能。

图:部署 Office Web Apps Server 的步骤

部署包含一台服务器的 Office Web Apps Server 场的三个主要步骤。

步骤 1:创建 Office Web Apps Server 服务器场

使用 New-OfficeWebAppsFarm 命令创建一个包含一台服务器的新 Office Web Apps Server 场,如以下示例中所示。

New-OfficeWebAppsFarm -InternalUrl "https://server.contoso.com" -ExternalUrl "https://wacweb01.contoso.com" -CertificateName "OfficeWebApps Certificate" -EditingEnabled

参数

  • –InternalURL 是运行 Office Web Apps Server 的服务器的完全限定的域名 (FQDN),如 https://servername.contoso.com

  • –ExternalURL 是可以在 Internet 上访问的 FQDN。

  • –CertificateName 是证书的友好名称。

  • 使用可选的 –EditingEnabled,可以在与 SharePoint 2013 结合使用的 Office Web Apps 中启用编辑。Lync Server 2013 不使用此参数,因为相应主机不支持编辑。

New-OfficeWebAppsFarm 中描述了配置翻译服务、代理服务器、剪贴画支持以及联机查看器的其他参数。

如果您看到“500 Web 服务异常”或“500.21 – 内部服务器错误”消息

步骤 2:验证是否成功创建了 Office Web Apps Server 服务器场

在创建服务器场后,将在 Windows PowerShell 提示符中显示有关服务器场的详细信息。若要验证是否正确安装并配置了 Office Web Apps Server,请使用 Web 浏览器访问 Office Web Apps Server 发现 URL,如下面的示例所示。发现 URL 是您在配置 Office Web Apps Server 服务器场时指定的 InternalUrl 参数,后跟 /hosting/discovery,例如:

https://server.contoso.com/hosting/discovery

如果 Office Web Apps Server 按预期运行,您应该在 Web 浏览器中看到 Web 应用程序开放平台接口 (WOPI) 协议发现 XML 文件。该文件的前几行应类似以下示例。

<?xml version="1.0" encoding="UTF-8"?>
<wopi-discovery><net-zone 
name="internal-https"><app name="Excel" checkLicense="true" 
favIconUrl="https://wac.contoso.com/x/_layouts/images/FavIcon_Excel.ico"><action 
name="view" 
urlsrc="https://wac.contoso.com/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" 
default="true" ext="ods"/><action name="view" 
urlsrc="https://wac.contoso.com/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" 
default="true" ext="xls"/><action name="view"
 

备注

根据您的 Web 浏览器的安全设置,您可能会在发现 XML 文件的内容显示之前看到提示您选择“显示所有内容”的消息。

步骤 3:配置主机

服务器场现在已经可以通过 HTTPS 为主机提供 Office Web Apps 功能。有关如何配置主机的详细信息,请查阅以下文章。

部署使用 HTTPS 的、包含多台服务器的负载平衡 Office Web Apps Server 服务器场

如果您预计您的 Office Web Apps Server 场流量很大,并且您希望其通过 Internet 且在内部网络中可用,则应使用此类型的拓扑。本节介绍如何安装使用负载平衡器和 HTTPS 的、包含多台服务器的 Office Web Apps Server 场。如果您感兴趣,请阅读关于此拓扑的详细信息

开始之前,请先确保已按照 Office Web Apps Server 的负载均衡器要求中所述操作,配置负载均衡器。还需按照使用 HTTPS 保护 Office Web Apps Server 通信中所述操作,在负载均衡器上安装证书。此 Office Web Apps Server 场将向 SharePoint 2013 和 Lync Server 2013 提供 Office Web Apps 功能。

图:部署 Office Web Apps Server 的步骤

部署包含多台服务器的 Office Web Apps Server 场的四个主要步骤。

步骤 1:在第一台服务器上创建 Office Web Apps Server 服务器场

使用 New-OfficeWebAppsFarm 命令在第一台服务器上创建的新 Office Web Apps Server 场,如以下示例中所示。

New-OfficeWebAppsFarm -InternalUrl "https://server.contoso.com" -ExternalUrl "https://wacweb01.contoso.com" -SSLOffloaded -EditingEnabled

参数

  • –InternalURL 是运行 Office Web Apps Server 的服务器的完全限定的域名 (FQDN),如 https://servername.contoso.com

  • –ExternalURL 是可以在 Internet 上访问的 FQDN 名称。

  • -SSLOffloaded 允许卸载到负载平衡器的 SSL 端接。

  • 使用可选的 –EditingEnabled,可以在与 SharePoint 2013 结合使用的 Office Web Apps 中启用编辑。Lync Server 2013 不使用此参数,因为相应主机不支持编辑。

New-OfficeWebAppsFarm 中描述了翻译服务、 代理服务器、 剪贴画支持和在线查看器配置其他参数。

如果您看到“500 Web 服务异常”或“500.21 – 内部服务器错误”消息

步骤 2:向服务器场中添加更多服务器

第一台服务器运行 Office Web Apps Server 后,在您要添加到 Office Web Apps Server 服务器场中的每台服务器上运行 New-OfficeWebAppsMachine 命令。对于 –MachineToJoin 参数,请使用已存在于 Office Web Apps Server 服务器场中的某台服务器的计算机名称。例如,如果 server1.contoso.com 已位于服务器场中,请使用以下名称:

New-OfficeWebAppsMachine -MachineToJoin "server1.contoso.com"

需要有关这些参数的详细信息?可以在 New-OfficeWebAppsMachine 中找到这些信息。

步骤 3:验证是否成功创建了 Office Web Apps Server 服务器场

在创建服务器场后,将在 Windows PowerShell 提示符中显示有关服务器场的详细信息。若要验证是否正确安装并配置了 Office Web Apps Server,请使用 Web 浏览器访问 Office Web Apps Server 发现 URL,如下面的示例所示。发现 URL 是您在配置 Office Web Apps Server 服务器场时指定的 InternalUrl 参数,后跟 /hosting/discovery,例如:

https://server.contoso.com/hosting/discovery

如果 Office Web Apps Server 按预期运行,您应该在 Web 浏览器中看到 Web 应用程序开放平台接口 (WOPI) 协议发现 XML 文件。该文件的前几行应类似以下示例。

<?xml version="1.0" encoding="UTF-8"?>
<wopi-discovery><net-zone name="internal-https"><app name="Excel" checkLicense="true" favIconUrl="https://officewebapps.contoso.com/x/_layouts/images/FavIcon_Excel.ico"><action name="view" urlsrc="https://officewebapps.contoso.com/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" default="true" ext="ods"/><action name="view" urlsrc="https://officewebapps.contoso.com/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" default="true" ext="xls"/><action name="view" urlsrc="https://officewebapps.contoso.com/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" default="true" ext="xlsb"/> 

备注

根据您的 Web 浏览器的安全设置,您可能会在发现 XML 文件的内容显示之前看到提示您选择“显示所有内容”的消息。

步骤 4:配置主机

服务器场现在已经可以通过 HTTPS 为主机提供 Office Web Apps 功能。有关如何配置主机的详细信息,请查阅以下文章。

如果您看到“500 Web 服务异常”或“500.21 – 内部服务器错误”消息

如果安装然后删除了 .NET Framework 3.5 的功能,在运行 OfficeWebApps cmdlet 时,您可能会看到“500 Web 服务异常”或“500.21 – 内部服务器错误”消息。若要解决此问题,请从提升的命令提示符运行以下示例命令来清理阻止 Office Web Apps Server 正确运行的设置:

对于 Windows Server 2008 R2

%systemroot%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -iru
iisreset /restart /noforce

对于 Windows Server 2012 或 Windows Server 2012 R2

dism /online /enable-feature /featurename:IIS-ASPNET45

另请参阅

New-OfficeWebAppsFarm
New-OfficeWebAppsMachine

Office Web Apps Server 内容指南
规划 Office Web Apps Server
为 SharePoint 2013 配置 Office Web Apps

部署 Office Web Apps Server 和 Lync Server 2013