部署环境:windows server 2012 R2,服务器在AD域中

参考网址:

https://msdn.microsoft.com/zh-cn/magazine/jj219455(office.15).aspx

http://www.cnblogs.com/yanweidie/p/4516164.html

1.安装windows server 2012 R2,注意不要用预览版,并安装windows更新,重启服务器

2.安装.NET Framework 4.5.2

3.以管理员身份打开 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

4.安装Office Web Apps Server,一般为iso文件,如:cn_office_web_apps_2013_x64_dvd_1133682.iso

5.下载并安装 Office Web Apps Server SP1,wacserversp2013-kb2880558-fullfile-x64-glb.exe

6.为 Office Web Apps Server 安装语言包,Microsoft 从这个地址下载,如:wacserverlanguagepack.exe

7.为服务器配置AD域,从计算机属性页面-计算机名称、域和工作组设置中可设置。并添加一个AD域账户,赋予服务器管理员权限

8.用该账户登录服务器,以管理员身份打开 Windows PowerShell 提示符,使用 New-OfficeWebAppsFarm 命令创建一个包含一台服务器的新 Office Web Apps Server 场,如以下示例中所示

New-OfficeWebAppsFarm -InternalURL "http://servername" -ExternalUrl "https://server.external.contoso.com" -AllowHttp -EditingEnabled
  • –InternalURL 内部访问地址,一般是http://机器名.AD域控地址

  • –AllowHttp  是否允许http访问

  • - ExternalUrl 外部访问地址,一般是服务器的ip地址。
  • –EditingEnabled 在 Office Web Apps 中启用编辑(如果它与 SharePoint 2013 一起使用)。Lync Server 2013 或 Exchange Server 2013 不使用此参数,因为这些主机不支持编辑。

更多参数使用请查看:https://msdn.microsoft.com/zh-cn/magazine/jj219436.aspx

如果没有报错,访问地址 http://机器名.AD域控地址//hosting/discovery,可看到wopi-discovery文档

第二部分  使用WOPI实现文档在线预览和编辑(编辑支持docx,xlsx,pptx,不支持doc,xls,ppt;在线查看上述都支持

1.代码地址:https://github.com/marx-yu/WopiHost 有两个分支,主分支对应的是 Office online 2016,release_0.8_for_owa2013对应office web app server 2013,我们使用此分支的代码

2.切换到此分支后,需要另外引用Microsoft.CobaltCore.dll。在部署office web app server的服务器上可搜索到该dll。

3.由于我是用虚拟机部署部署office web app server,需要修改CobaltServer.cs文件的里的地址,使得虚拟机可以访问该地址。如果端口号被占用,也需要修改。

 public CobaltServer(string docsPath, int port = )
{
m_docsPath = docsPath;
m_port = port;
} public void Start()
{
m_listener = new HttpListener();
m_listener.Prefixes.Add(String.Format("http://10.204.13.78:{0}/wopi/", m_port));
m_listener.Start();
m_listener.BeginGetContext(ProcessRequest, m_listener); Console.WriteLine(@"WopiServer Started");
}

4.文件放置根目录在Program.cs文件里,可以自行修改

5.运行程序,访问地址,可查看word文档test.docx,注意:test.docx必须在4所说的根目录下,其他更多url地址访问参考wopi-discovery文档

http://机器名.AD域控地址/wv/wordviewerframe.aspx?WOPISrc=http://10.204.13.78:8081/wopi/files/test.docx&access_token=06l%20hXK6zWTUi

注:

1.docx文件保存需要点击保存按钮,而xlsx文件不用。

2.docx文件打开编辑页面存在缓存bug,即打开页面后关闭,在本地用office修改文件,再次用浏览器打开编辑页面,仍为原来的页面,office online server (查看  http://www.cnblogs.com/ldybyz/p/6645127.html)则不会有这个问题

 

6.office web app server的日志记录在  %programdata%\Microsoft\OfficeWebApps\Data\Logs\ULS\,需要服务器显示隐藏文件夹和管理员权限,方便查看错误信息以便定位错误。

7.wopi相关文档: https://wopi.readthedocs.io/en/latest/

其他相关博客:

http://www.cnblogs.com/poissonnotes/p/3267190.html

其他源码示例:

https://code.msdn.microsoft.com/office/Building-an-Office-Web-f98650d6

https://github.com/thebitllc/WopiBasicEditor

https://github.com/Microsoft/Office-Online-Test-Tools-and-Documentation

https://github.com/oec2003/OWAEditorSample.git

office online server(office web app server升级版) 相关文档:

https://technet.microsoft.com/zh-cn/library/jj219437(v=office.16).aspx

http://www.cnblogs.com/love007/p/6274910.html

其他文章:

http://www.wictorwilen.se/Tags/Office%20Web%20Apps

office web app server部署和简单操作的更多相关文章

  1. office online server部署和简单操作

    office online server是Office Web Apps Server的升级版本,安装环境必须为 Windows Server 2012 R2 参考地址:https://technet ...

  2. office web app server 文件预览部署&& wopi 集成使用

    对于需要进行office 套件文档预览的时候大部分大家使用的是插件,或者类似的,解决方案,微软已经为我们提供了比较好的解决 方案 office web app server (目前名称是office ...

  3. Office Web app server 2013 目前无法和windows server 2012 R2兼容。

    另外旧版的office文档和PDF格式不支持预览功能.

  4. Office Web Apps Server 概述

    Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.PowerPoint.Excel 和 OneNote 的基于浏览器的版本.单个 Office Web ...

  5. Office web app server2013详细的安装和部署

    转自:http://blog.csdn.net/u011355311/article/details/9360293 SharePoint 2013集成Office web apps server20 ...

  6. [转载]部署Office Web Apps Server并配置其与SharePoint 2013的集成

    Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.PowerPoint.Excel 和 OneNote 的基于浏览器的版本.单个 Office Web ...

  7. 部署Office Web Apps Server并配置其与SharePoint 2013的集成

    部署Office Web Apps Server并配置其与SharePoint 2013的集成   Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.P ...

  8. Windows Server 2012 R2安装部署Office Web Apps Server

    微软官方参考地址https://technet.microsoft.com/zh-cn/library/jj219455.aspx,建议参考官方说明. 注意:每一步进行完成后重启服务器!!! 一.   ...

  9. office web apps server安装部署

    操作系统:windows 2012 软件下载地址: 链接:https://pan.baidu.com/s/1c3WWFs8 密码:4dcy NDP452-KB2901954-Web.exe(.Net ...

随机推荐

  1. SQL Server nested loop join 效率试验

    从很多网页上都看到,SQL Server有三种Join的算法, nested loop join, merge join, hash join. 其中最常用的就是nested loop join. 在 ...

  2. 背水一战 Windows 10 (41) - 控件(导航类): Frame

    [源码下载] 背水一战 Windows 10 (41) - 控件(导航类): Frame 作者:webabcd 介绍背水一战 Windows 10 之 控件(导航类) Frame 示例Controls ...

  3. Mac下如何安装配置Homebrew

    Last login: Mon Aug 7 13:57:29 on consolexiashenbindeMacBook-Pro:~ xiashenbin$ ruby -e "$(curl ...

  4. SQL 将一列多行数据合并为一行

    原表数据: 期望结果: 使用STUFF + FOR XML PATH即可实现以上效果 执行以下SQL: , , '') AS Course FROM Student AS T 可以看到输出结果与期望结 ...

  5. iOS开发手记-iOS8中使用定位服务解决方案

    问题描述: 在iOS8之前,app第一次开始定位服务时,系统会弹出一个提示框来让用户选择是否允许使用定位信息.但iOS8后,app将不会出现这个弹窗.第一次运行之后,在设置->隐私->定位 ...

  6. karma 启动提示PhantomJS not found on PATH

    Karma 介绍:是由AngularJS团队开发的测试执行过程管理实用工具,帮助开发人员在不同的浏览器中执行测试. 一般搭配PhantomJS作为浏览器启动器.PhantomJS是一个非主流的Webk ...

  7. 【learning】 扩展欧几里得算法(扩展gcd)和乘法逆元

    有这样的问题: 给你两个整数数$(a,b)$,问你整数$x$和$y$分别取多少时,有$ax+by=gcd(x,y)$,其中$gcd(x,y)$表示$x$和$y$的最大公约数. 数据范围$a,b≤10^ ...

  8. 解决修改css或js文件,浏览器缓存更新问题。

    在搜索引擎中搜索关键字.htaccess 缓存,你可以搜索到很多关于设置网站文件缓存的教程,通过设置可以将css.js等不太经常更新的文件缓存在浏览器端,这样访客每次访问你的网站的时候,浏览器就可以从 ...

  9. Nginx单向认证的安装配置

    Nginx单向认证的安装配置 首先系统要已经安装了openssl,以下是使用openssl安装配置单向认证的执行步骤与脚本: #------------------------------------ ...

  10. Java8-用Lambda表达式给List集合排序

    Lambda用到了JDK8自带的一个函数式接口Comparator<T>. 准备一个Apple类 public class Apple { private int weight; priv ...