Friday 11 July 2014

Deploying and Configuring Office Web Apps Server 2013



I'm installing a single server Office Web Apps 2013 'farm' on a Windows 2012 R2 box.
First up, getting hold of the software.. No subscription needed just head over to Microsoft's website grab yourself the .img file, I wont make you go hunting, the link is here! (UPDATE: I'm afraid now this is not the case, Microsoft have decided to only make this available on the VLSC / MSDN download centers.) While we're in the realm of the Microsoft site, you may as well pick up the latest service pack for it: SP1
(note, you are still required to have a licence, at least for editing Office files, but it is likely you are covered under your EULA if you have one)
OK, before we can install this we need a few prerequisites, luckily nothing to download here, there is a nice little PowerShell one liner to get the server up to speed. Open up a PowerShell window as Admin and run:

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



When complete, you will be reliably informed that you need a reboot.



You can do this right from your PowerShell window by going for
Restart-Computer

Have a check in Server Manager - Manage - Add Roles and Features and check you have some role and features added:



OK, lets move onto install Office Web Apps Server 2013, this is much less exciting than it sounds!

Mount the .img file you downloaded earlier and run it, choose a file location to install to. Generally as good practice (this applied to SharePoint also) I install my OS and Program files on different drives, you will see here I am going for E:\Microsoft Office Web Apps


This then installs with no other options and quietly completes. Nothing to see here!

Onto the Service Pack, run this, accept the agreement, hit continue, again nothing special or noteworthy.



There's a couple of installation scenarios, basically the decision is between single or multi server farms and HTTPS or HTTP. Microsoft recommend in a production environment HTTPS is used. Also if you're going to be using this server farm to service Lync 2013, there aint no option but to go for SSL secured. I do plan to use this for Lync and Exchange 2013 and so will need to be going for the HTTPS option. Making this blog fully fledged but we have to get into creating certificates etc.

Right, so we're going to need to activate the WCF Services HTTP Activation feature to allow us to securely communicate. Head to Server Manager - Manage - Add Roles and Features. Open up the .Net framework 4.5 group, WCF Services and tick on 'HTTP Activation'


You then need to confirm and carry on installing this


Let's now sort out the certificate. This is assuming you have a certification authority setup in your domain. 

Start - MMC - Add or Remove Snap-in

Add the Certificates Snap-in


We want to access certificates for the local computer account
Now you should see the certificate store, we're going to carry on a right click on Personal, choose All Tasks - Request New Certificate
Luckily my 'administrator' has configured the enrollment policy, so i'm going to choose that
We want a Web Server certificate, and due to the encryption options i want to have the choice of later, i'm going for Enterprise
You will see it says that more information is required to continue, clicking this link we see the following window.In here, we need to add the Common Name (CN) in the subject name field. The common name is the name of the server, not fully qualified. If you're planning to have the url the name of the server with a port then this is all for this screen. If you're having a DNS entry pointing to this server you can add this in the Alternative Name section, but for me, just the CN is good enough.
On the General tab, choose a friendly name, make this something meaningful. I have copied this into the description as the description is sometimes displayed in places the name is not, so this covers all bases!
Now, following is one of the differences we get from the enterprise web server certificate option, we want a key length of 2048. This is already selected. We also need to select the box 'Make private key exportable'
In the Certification Authority tab, select your authority.
Click OK and this will take you back to the Certificate Enrollment screen where we can now press 'Enroll'
The certificate will appear in the console
Check this has also appeared in IIS. Head to Server Certificates. Do not bind this, the setup powershell command does the magic for us.
Time now to create the Office Web Apps Farm. Open up a PowerShell window and run the following command. Obviously replacing the red text with your own details.
New-OfficeWebAppsFarm -InternalUrl "https://yourserver.fqdn-CertificateName "Office Web Apps Certificate Friendly Name-EditingEnabled

Note that the 'EditingEnabled' switch is only if you have a licence for editing. You will get a nice little warning about this in the window asking you to confirm. Then followed by a whole load of gumf about the farm details.

Now the moment of truth, time to test that your server is working. On your local machine, enter the https url (which is basically the server name) with /hosting/discovery at the end. All being well you should see an XML output resembling the following


Once you've confirmed the OWA server is accessible via a secure URL, time to bind 
SharePoint to it. Head over to your SharePoint App server and open the SharePoint 
PowerShell window (- as Admin of course!)
Run the command 
New-SPWOPIBinding –ServerName “owaserver.fqdn”

This should flash up all the bindings to various applications being created.
That’s it done! Time to test.
Head to a document library on SharePoint 2013, find a Word document and click on 
the three dots next to it for additional details. This should load with a large area for
preview, then show you Office Web Apps is loading as per the following image. 
All being well this will load and show you a preview of the document!

No comments:

Post a Comment