最近做一个项目,需用到在线文档预览功能,查了下资料,微软的Office Web Apps支持doc,ppt,xls,docx,pptx,xlsx,pdf在线文档预览。购买的Aliyun服务器所有80端口被占用,所以在本地搭建虚拟测试环境。
主要操作步骤如下:
1、建VMware虚拟机
2、构建两台虚拟服务器
a)服务器配置
操作系统:Windows Server 2012 R2
内存:2G
硬盘:20G
CPU:1核
b)域控服务器
i.创建域服务(Active Directory)
1.选择角色功能

2.添加角色和功能向导

3.基于角色或基于功能的安装

4.从服务器池中选择服务器

5.添加Active Directory域服务

6.根据提示选择下一步

7.安装完成

ii.配置域服务(将AD DS升级为域控制器)
1.点击服务器管理器左侧“AD DS”

2.弹出“所有服务器任务详细信息”选择“将此服务升级为域控服务器”如图

3.进入域服务器配置向导,如图

4.设置密码

5.依次选择“下一步”如图





6.点击“安装”如图

7.安装完成会自动重启服务,到此域控服务器安装完成
iii.将转换服务器加入到域控服务器

1.修改DNS,指向域控服务器的IP
2.修改计算名称,并指定隶属的域,如图

3.设置链接域控服务器的密码

4.链接成功会提示

5.在域控服务器添加转换服务器

6.查找转换服务器

7.如下图联机成功

c)转换服务器
i.安装iis7
1.添加角色功能向导,如图

2.依次点击下一步到服务器角色处,选择Web服务器(IIS)

3.选择IIS相关选项

4.完成安装IIS

ii.安装墨迹支持
1.角色添加功能向导,依次到下一步,到功能处选择“墨迹和手写服务”

2.到此需重启服务

iii.安装office web apps
iv.安装office web apps语言包(wacserverlanguagepack.exe)
v.安装office web apps sp1补丁包(wacserversp2013-kb2880558-fullfile-x64-glb.exe)
vi.以管理员身份运行PowerShell配置Office web apps
1.执行命令导入OfficeWebApps:Import-Module OfficeWebApps
2.执行命令:New-OfficeWebAppsFarm -InternalURL http://previewdoc.tuizhis.com -ExternalURL http://previewdoc.tuizhis.com -AllowHttp -EditingEnabled -OpenFromUrlEnabled
a)参数说明
i.InternalURL:内网访问地址
ii.ExternalURL:外网访问地址
iii.AllowHttp 允许80端口访问
iv.OpenFromUrlEnabled 允许通过url方式进行预览
出现下面的界面就安装成功

测试Word预览效果

网友评论