部署 Office Web Apps Server

 

应用于: Office Web Apps Server

摘要:介绍如何在本地部署 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 应用 Server 的预览。

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

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

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

注意

可通过使用鼠标、键盘快捷方式或触控来完成所有 Office 2013 套件中的任务。 要了解如何将键盘快捷方式和触控用于 Office 产品和服务,请参阅键盘快捷方式Office 触控指南

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

在将运行 Office Web Apps Server 的所有服务器上执行这些过程。

图:为 Office Web Apps Server 准备服务器的步骤

为 Office Web 应用 Server 准备服务器的三main步骤。

步骤 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
    

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

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

  1. 批量许可服务中心 (VLSC) 下载 Office Web Apps Server。 要下载 Office Web Apps Server,必须具有 Office Professional Plus 2013、Office 标准版 2013 或 Office for Mac 2011 许可证(批量许可协议下)。 下载位于 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 应用 Server 文件的文件夹, (例如 C:\Program Files\Microsoft Office Web 应用) ,然后选择“立即安装”。 If the folder you specified doesn't exist, Setup creates it for you.

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

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

  6. 下载并安装 Office Web 应用 Server SP1 (建议用于 Windows Server 2012 和 Windows Server 2008 R2 SP1。Windows Server 2012 R2.) 是必需的

    注意

    如果您打算以后再应用 Office Web Apps Server SP1,请按照Apply software updates to 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 应用 Server 2013 语言包允许用户使用多种语言查看基于 Web 的 Office 文件,无论是从 SharePoint 2013 文档库打开,还是从 Outlook Web Access (作为附件预览) 打开,以及 Lync 2013 (作为 PowerPoint 广播) 。 若要了解有关语言包的工作方式的详细信息,请参阅规划 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 应用 Server 进行测试或内部使用,并且无需向 Lync Server 2013 提供 Office Web 应用 Server 功能,则此过程适合您。 在这里,你将安装使用 HTTP 的单服务器 Office Web 应用 服务器场。 您不需要证书或负载平衡器,但需要不运行任何其他服务器应用程序的专用物理服务器或虚拟机实例。

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

图:部署 Office Web Apps Server 的步骤

部署单服务器 Office Web 应用 服务器场的三main步骤。

步骤 1:创建 Office Web 应用服务器场

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

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

参数

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

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

  • –EditingEnabled 在与 SharePoint 2013 一起使用时,可在 Office Web Apps 中进行编辑。 Lync Server 2013 不使用该参数,因为相应主机不支持编辑。

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

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

步骤 2:验证 Office Web 应用 服务器场是否已成功创建

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

    http://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="http://servername/x/_layouts/images/FavIcon_Excel.ico" checkLicense="true">
    <action name="view" ext="ods" default="true" urlsrc="http://servername/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" /> 
    <action name="view" ext="xls" default="true" urlsrc="http://servername/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" /> 
    <action name="view" ext="xlsb" default="true" urlsrc="http://servername/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&>" /> 
    <action name="view" ext="xlsm" default="true" urlsrc="http://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 应用 服务器场。 需要按照使用 HTTPS 保护 Office Web Apps Server 通信中所述,在服务器上安装证书。

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

图:部署 Office Web Apps Server 的步骤

部署单服务器 Office Web 应用 服务器场的三main步骤。

步骤 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),如 http://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 应用 服务器场的四main步骤。

步骤 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),如 http://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