為SharePoint 2013配置Office Web Apps


最近看到新版的Office Web Apps Server開放下載了,貌似還是免費的,於是果斷下載了。

Office Web Apps,相信大家都不陌生,那么如何讓SharePoint文檔庫中的Office文檔使用Office Web Apps打開呢?

文檔預覽

image

在線查看:

image

在線編輯:

image

 

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

下面是具體配置步驟:

 

 

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 安裝語言包

clip_image001

重要:

    • 若要在創建 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

clip_image002

New-OfficeWebAppsFarm 中描述了配置翻譯服務、代理服務器、剪貼畫支持以及聯機查看器的其他參數。您可以在規划 Office Web Apps(與 SharePoint 2013 一起使用)中查找有關如何獲取允許用戶使用 Office Web Apps Server 編輯文件的許可證的其他信息。若要了解如何在 SharePoint Server 2013 中使用這些許可證,請參閱在 SharePoint Server 2013 中配置許可

clip_image003

注意:

如果安裝然后刪除了 .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 命令提示符處顯示了一個綁定列表。

clip_image004

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>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM