How to Install Office Online Server and Connect it with SharePoint 2016

//How to Install Office Online Server and Connect it with SharePoint 2016

How to Install Office Online Server and Connect it with SharePoint 2016

Microsoft Office Online Server is successor to Office Web Apps. Now Office Online Server is a separate product and could be integrated not only with SharePoint but also with Skype for business and Exchange as well.

In this post we will be looking at how to prepare the environment and configure the Office Online Server with SharePoint.

We will be using Windows Server 2016 as our operating system.

Prepare the Environment.

  1. System

Get the System with at-least below specifications with OS Windows Server 2012 R2 or Windows Server 2016

12 GB· 64-bit, 4 cores· 80 GB for system drive

· 80 GB for second drive

Install Prerequisites:

Open PowerShell as administrator and Run below command:

Windows Server 2012 R2

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,Windows-Identity-Foundation,Server-Media-Foundation

Windows Server 2016

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,NET-Framework-Features,NET-Framework-45-Features,NET-Framework-Core,NET-Framework-45-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45,Windows-Identity-Foundation,Server-Media-Foundation

Prepare Server OOS

If you are getting error for source then, You can use the media directory or copy the files from your Windows Server media to C:\sources and add following to the command above ” -Source {Drive}\sources\sxs”

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,NET-Framework-Features,NET-Framework-45-Features,NET-Framework-Core,NET-Framework-45-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45,Windows-Identity-Foundation,Server-Media-Foundation -Source D:\sources\sxs

Prepare Server OOS.png

Once the command is successful.

Next we need to install following:

Don’t worry if while installing for some it says it already installed, just move to next in the list.

Installation Office Online Server

Now it is time to install Office Online Server, You can find Office Online Server at  Volume Licensing Service Center (VLSC)

install Office ONline Server

Run setup.exe as administrator

Accept term, continue and Install at default location.

We also need to install language packs here as well. Download the language pack from  below links.

Microsoft Download Center

Run and install it.Once installed successfully, move next to configuration section.

Configuring Office Online Server

We are going to configure it for Production Environment and we will be using Https.

so before you begin install the certificate on Office Online Server OS and change and run below commands:

Import-Module -Name OfficeWebApps 

New-OfficeWebAppsFarm -InternalUrl “https://server.contoso.com” -ExternalUrl “https://wacweb01.contoso.com” -CertificateName “OfficeWebApps Certificate” -EditingEnabled

Now verify by your installation by browsing below link:

https://oos.yourdomain.com/hosting/discovery

Example as below:

https://server.contoso.com/hosting/discovery

Now you need to add DNS records for your server to make it accessible to rest of the farm. If you are going with one node of Office Online Server then no need for Load Balancer.

If your requirement is to add loadbalancer and want SSL Offloading  then you then need to enable the Http while creating the server, you can use below command:

Below command will automatically include allow http because of -SSlOffloaded parameter.

New-OfficeWebAppsFarm -InternalUrl “https://server.contoso.com” -ExternalUrl “https://wacweb01.contoso.com” -SSLOffloaded -EditingEnabled

If you need to remove the existing server you can do that by running below command for parent server, you may need to run addition commands if you have more then one server in the oos farm:

Remove-OfficeWebAppsMachine

you could always add new server nodes as you need it.

If you have not updated DNS records, You can still verify the configuration by going to below URL:

https://localhost/hosting/discovery

This will give you certificate error as the certificate is for your actual domain not for localhost.

Also note that the New-OfficeWebApsFarm command will create windows firewall rule for port 80,443, 809 for inbound traffic

Configure SharePoint 2016 to Use Office Online Server

Add-PSSnapin Microsoft.SharePoint.Powershell

New-SPWOPIBinding -ServerName <WacServerName>

example:

New-SPWOPIBinding -ServerName oos.contoso.com

Above command will run and will give you long output without giving any warning text.

Some times the above commands will give warning messages if  you work on server with SharePoint Role as Application.

WARNING: The server did not respond. Trying again (attempt 1 of 5).

So try to run commands on Front End server and close the Powershell as it is not recommended to keep it open on production Front Ends.

Enable Excel Soap API

$Farm = Get-SPFarm
$Farm.Properties.Add(“WopiLegacySoapSupport”, “<URL>/x/_vti_bin/ExcelServiceInternal.asmx”);
$Farm.Update();

Example:

$Farm = Get-SPFarm
$Farm.Properties.Add(“WopiLegacySoapSupport”, “https://OfficeOnlineServer.contoso.com/x/_vti_bin/ExcelServiceInternal.asmx”);
$Farm.Update();

Verify that Office Web Apps Are working

Go to any Word Document in any library in SharePoint farm and click on the any word or excel file, it should automatically open this file in the WordOnline window.

If you are getting error like the server is not found try to run below on SharePoint Server, by default the -Zone is set to “internal-https”

Set-SPWOPIZone -Zone “external-https”

 

By using External-https point, SharePoint will use the external URL of the OOS which was configured while creating the OOS farm and will work with most clients.

SharePoint Configuration Official Site

The Official Article

Useful Resource 

Useful Resources 1

 

 

By |2018-11-15T11:23:06+00:00November 14th, 2018|SharePoint 2016|0 Comments

About the Author:

Leave A Comment

Skip to toolbar