为SharePoint 2013配置Office Web Apps


最近看到新版的Office Web Apps Server开放下载了,貌似还是免费的,于是果断下载了。

Office Web Apps,相信大家都不陌生,那么如何让SharePoint文档库中的Office文档使用Office Web Apps打开呢?

文档预览

在线查看:

在线编辑:

-----------------------------------------------------------------------------------------------------------------

下面是具体配置步骤:

1.为 Office Web Apps Server 安装必备软件

如果是 Windows Server 2008 R2,需要安装以下必须组件:

以管理员身份打开 Windows PowerShell 提示符,然后运行以下示例命令来安装必需的角色和服务。
Windows Server 2008 R2
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

Windows Server 2012
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
如果出现提示,请在该命令完成后重新启动服务器。

2.安装 Office Web Apps Server

3.为 Office Web Apps Server 安装语言包

重要:

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

4.部署 Office Web Apps Server 服务器场

以下示例中的代码创建包含一台服务器的新 Office Web Apps Server 服务器场。您为 –InternalURL 指定的 URL 是运行 Office Web Apps Server 的服务器的名称,例如http://servername。–AllowHttp 参数将服务器场配置为使用 HTTP,而 –EditingEnabled 参数在 Office Web Apps 中启用编辑(如果它与 SharePoint 2013 一起使用)。Lync Server 2013 或 Exchange Server 2013 不使用 –EditingEnabled 参数,因为这些主机不支持编辑。

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

New-OfficeWebAppsFarm 中描述了配置翻译服务、代理服务器、剪贴画支持以及联机查看器的其他参数。您可以在规划 Office Web Apps(与 SharePoint 2013 一起使用)中查找有关如何获取允许用户使用 Office Web Apps Server 编辑文件的许可证的其他信息。若要了解如何在 SharePoint Server 2013 中使用这些许可证,请参阅在 SharePoint Server 2013 中配置许可

注意:

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

%systemroot%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -iru

iisreset /restart /noforce

5.验证是否成功创建了 Office Web Apps Server 服务器场

在创建服务器场后,将在 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&>" />

6.配置SharePoint

以管理员运行SharePoint 2013命令行管理程序

运行以下命令,其中 <WacServerName> 是您为内部 URL 设置的完全限定的域名 (FQDN)。这是 Office Web Apps Server 流量的入口点。对于此测试环境,您必须指定 –AllowHTTP 参数以允许 SharePoint 2013 通过使用 HTTP 接收来自 Office Web Apps Server 服务器场的发现信息。如果您忘记指定 –AllowHTTP,则 SharePoint 2013 将尝试使用 HTTPS 与 Office Web Apps Server 服务器场进行通信,并且此命令将失败。

New-SPWOPIBinding -ServerName <WacServerName> -AllowHTTP

运行此命令后,您应看到 Windows PowerShell 命令提示符处显示了一个绑定列表。

7.设置SharePoint绑定的WOPI区域

Office Web Apps Server 使用区域的概念来确定其与主机(此示例中为 SharePoint 2013)进行通信时将使用的 URL(内部或外部)和协议(HTTP 或 HTTPS)。默认情况下,SharePoint Server 2013 使用 internal-https 区域。通过运行以下命令来确认这是当前区域:

Get-SPWOPIZone

运行此命令后,您应看到显示的 WOPI 区域。它应为 internal-https。

如果通过执行上面 获得的结果为 internal-https,则运行以下命令可将区域更改为 internal-http。您必须进行此更改,因为 SharePoint 2013 的区域必须匹配 Office Web Apps Server 服务器场的区域。

Set-SPWOPIZone –zone “internal-http”

通过运行以下命令来确认新的区域为 internal-http:

Get-SPWOPIZone

8.将 SharePoint 2013 中的 AllowOAuthOverHttp 设置更改为 True

若要在测试环境中通过 HTTP 将 SharePoint 2013 与 Office Web Apps 结合使用,您必须将 AllowOAuthOverHttp 设置为 True。否则,Office Web Apps 将不起作用。可通过运行以下示例来检查当前状态:

(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp

如果此命令返回 False,则运行下列命令可将其设置为 True。

$config = (Get-SPSecurityTokenServiceConfig)

$config.AllowOAuthOverHttp = $true

$config.Update()

再次运行以下命令来验证 AllowOAuthOverHttp 设置现在是否设置为 True。

(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp

参考文档:

Office Web Apps 及其如何在本地与 SharePoint 2013 一起运行的概述

来自 <http://technet.microsoft.com/zh-cn/library/ff431685.aspx>

规划 Office Web Apps(与 SharePoint 2013 一起使用)

来自 <http://technet.microsoft.com/zh-cn/library/ff431682.aspx>

配置 SharePoint 2013 以使用 Office Web Apps

来自 <http://technet.microsoft.com/zh-cn/library/ff431687.aspx>

New-SPWOPIBinding

来自 <http://technet.microsoft.com/zh-cn/library/jj219441.aspx>

配置 SharePoint 2013 以使用 Office Web Apps

来自 <http://technet.microsoft.com/zh-cn/library/ff431687.aspx>

优质内容筛选与推荐>>
1、Java 多线程
2、Cpp Chapter 10: Objects and Classes Part3
3、codeforces 213div(2) 365 A.Good Number 365 B.The Fibonacci Segment
4、木马隐藏技术(2) -- 服务
5、8.7总结


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号