標籤:des style blog http 使用 strong
前提條件
Office web app server2013不能跟sharepoint server2013安裝在同一台伺服器上,如果安裝在同一台伺服器上將提示如下錯誤:
後來查詢資料:
按照官方文檔的說法,和SharePoint 2013的需求相同,需要8-12GB的記憶體,它要求作業系統必須是Windows Server 2008 R2 SP1或者Windows Server 2012 ,並且需要安裝.Net Framework 4.5等。
根據微軟的資料如:
可以注意到兩點:
Ø Office Web Apps 2013作為一個獨立的Server,是獨立於SharePoint安裝的,不再需要像SharePoint 2010的時候,需要和SharePoint伺服器安裝在一起(一定程度上節省了License的費用)。
Ø Office Web Apps 2013不僅可以為SharePoint提供Office文檔的渲染服務(文檔支援的格式沒變,不包括PDF),而且可以為微軟的Exchange Server和Lync Server提供文檔渲染服務,更可以為共用資料夾甚至第三方的應用提供這一服務。
Office Web Apps Server和使用其服務的Server之間,是通過一個全新的WOPI(Web application Open Platform Interface)介面協議進行通訊的,其對外通道依然是HTTP/HTTPS協議。Office Web Apps Server叫做WOPI APP,而使用這個服務的,叫做WOPI Host。
需要
Ø Powershell V3(http://www.microsoft.com/en-us/download/details.aspx?id=29939)
Ø .NET Framework4.5
Ø windows server 2008 R2 SP1
Ø Windows6.1-KB2592525-x64(http://www.microsoft.com/zh-cn/download/details.aspx?id=27929)
Office Web App Server 2013安裝
第1步驟:如果是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 server2012
Import-Module ServerManager
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
然後再執行如下
Office Web App Server 2013配置
根據此圖,接下來就是建立伺服器陣列了,這個伺服器陣列指的不是SharePoint場,而是Office Web Apps伺服器陣列——這個伺服器陣列中可以包含多個Office Web Apps Server,作不同的角色。建立的方式很簡單,PowerShell:
第1步驟:
#載入Office Web Apps管理命令集,
Import-Module OfficeWebApps
第2步驟:
#建立伺服器陣列
New-OfficeWebAppsFarm –InternalURL http://servername –AllowHttp –EditingEnabled
說明:servername為安裝OWA(office web app server2013)的伺服器名稱
第3步驟:
#驗證伺服器陣列
http://servername/hosting/discovery
說明:
Office Web Apps Server 按預期運行,您應該在 網頁瀏覽器中看到 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&>" />
詳細請參考:
http://technet.microsoft.com/zh-cn/library/jj219455(v=office.15).aspx
我這裡機器名叫:OWA
New-OfficeWebAppsFarm –InternalURL http://OWA –AllowHttp –EditingEnabled
選擇Y後
解釋:這其中需要解釋的一個是AllowHttp:這個是配置是否允許通過HTTP方式訪問的(預設情況下是通過HTTPS);第二個是EditingEnabled,如果需要在瀏覽器中編輯文檔,則需要加上這個參數(另外,按照官方文檔的介紹,在SharePoint中,使用者是否可以在瀏覽器中編輯文檔,是需要有單獨的License配置的,這個所謂License的概念就是類似Standard CAL、Enterprise CAL的概念,只不過以前這個只能從伺服器層級區分,而在2013中可以在使用者層級區分了)
注意:提示安裝過程會提示如下錯誤
此時只需要【添加伺服器功能】如:
Ø 啟用“筆跡支援”服務
安裝完畢系統會自動重啟伺服器接著完成安裝即可。
Ø 啟用”windows身分識別驗證”服務
開啟已經添加的web伺服器IIS角色。添加角色服務,如:
測試office web app是否成功?在瀏覽器中輸入:
http://servername/hosting/discovery(serverName為OWA的機器名,我這裡是OWA)
如果安裝後出現如下錯誤:
解決辦法:
如果安裝然後刪除了 .NET Framework 3.5 的組件,在運行 OfficeWebApps cmdlet 時,您可能會看到“500 Web 服務異常”或“500.21 – 內部伺服器錯誤”訊息。若要解決此問題,請從提升權限的命令提示字元運行以下樣本命令來清理阻止 Office Web Apps Server 正確啟動並執行設定:
在命令列中輸入:
%systemroot%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -iruiisreset /restart /noforce
運行後可以看到:
Sharepoint 2013與Office Web App Server 2013整合
這個整合的過程,就是啟用Office Web Apps伺服器陣列來渲染/編輯SharePoint文件庫中的Office文檔。
這個配置也很簡單,開啟SharePoint的PowerShell指令碼視窗,執行兩句話:
New-SPWOPIBinding -ServerName <WacServerName> -AllowHTTP
Set-SPWopiZone internal-http
說明:
WacServerName指定 WOPI 應用程式(如運行 Office Web Apps Server的伺服器)的名稱或完整網域名稱 (FQDN)。
Ø 第一句話是在SharePoint場和Office Web Apps場之間建立關係,其中的AllowHTTP參數和之前的概念是一樣的;
u 該樣本為在運行此 cmdlet 的當前 SharePoint 場上的 WOPI 應用程式支援的所有應用程式和副檔名建立綁定
New-SPWOPIBinding –ServerName “Server.corp.Contoso.com”–AllowHTTP
根據前面的圖也可以把Excel,Word,PPT分配安裝在3台伺服器上,並以伺服器陣列的關聯起來,因此下面的例子只啟用其中一個
u 該樣本將 Excel 與運行此 cmdlet 的當前 SharePoint 場上的 WOPI 應用程式可對 Excel 執行的所有操作關聯
New-SPWOPIBinding –ServerName “Server.corp.Contoso.com” –Application “Excel”
Ø 第二句話,是配置地區的連結方式,地區分為internal和external,協議分為http和https,預設是internal + https,這裡我們使用internal-http,以便和之前配置Office Web Apps伺服器陣列的時候相匹配。
我這裡命令列是:
New-SPWOPIBinding –ServerName "owa.mono.com" -AllowHTTP Set-SPWopiZone internal-http
如:
大功告成
Office Web App Server 2013效果測試
上傳一片word文檔測試下,如下:
首先,Office Web Apps功能“System Account”(也就是“系統賬戶”administrator)是不能用的,如果你嘗試使用系統賬戶的身份訪問網站,並視圖線上瀏覽一個文檔的時候,會發生異常,從日誌中可以看到因為伺服器無法找到System Account映射的具體帳號。