Deploying Office Online 2017 on Windows Server 2016 to Enable Online Office Browsing

There was a big event at home, so I didn’t post for a week. Today, in the company, I installed Office Online on my own small server. It was slow and took more than 30 seconds to load a simple Word document (probably because I allocated too little memory to the virtual machine). Then in the evening, I had a strong desire to experience how fast it would be to install Office Online on a high-end server. So… tonight, I want to experience installing Office Online 2017 on a 4-core 8GB server on Alibaba Cloud… It should cost about 2 dollars… I will use the earnings from my Thunderbolt money making treasure last week to offset it…(English version Translated by GPT-3.5, 返回中文)

Here is the configuration of Alibaba Cloud:

AD Domain server, 1 core 2GB, Windows Server 2016 47.*.*.200

Office Online server, 4 cores 8GB, Windows Server 2016 47.*.*.125

server

Preparation

Note

  1. You must prepare 2 servers because Office Online will not run on a server that includes Active Directory Domain Services (AD DS).
  2. The domain controller service can use Windows Server 2016 Core Edition (without GUI), but Office Online Server 2017 only supports the “Server with Desktop Experience” installation option of Windows Server 2016 (if installed manually).
  3. The Office Server 2017 server should be as clean as possible and preferably be a new server.
  4. During the installation process, I exposed all the ports, but it is recommended to expose fixed ports in actual operations.
  5. Do not install any other server applications on the server running Office Online Server, including Exchange Server, SharePoint Server, Skype for Business Server, and SQL Server. If the server is not sufficient, you can run Office Online Server on a virtual machine of one of these servers.
  6. Do not install any services or roles that depend on the Web Server (IIS) role on port 80, 443, or 809, as Office Online Server regularly deletes web applications on these ports.
  7. Do not install any versions of Office. If Office is already installed, it must be uninstalled before installing Office Online Server.
  8. Office Online does not load Doc sources by IP address. The address must have a domain name. For example, http://1.2.3.4/t.docx will result in an error.
  9. For more attention points, refer to Plan Office Online Server - Microsoft Docs

Reference articles

  1. Deploy Office Online Server - Microsoft Docs
  2. Office Online Server 2016 detailed installation steps and issue summary - CSDN blog
  3. Deploying the First Domain Controller for Windows Server 2016 - 51CTO Blog

Software

All the software (except for Office) and test files are provided in this package download - office-online-dependent-packages.zip

  1. Office Online 2017

    1
    2
    3
    4
    5
    6
    文件名: cn_office_online_server_last_updated_november_2017_x64_dvd_100181918.iso
    文件大小: 734.58MB
    发布时间: 2017-11-08
    地址: ed2k://|file|cn_office_online_server_last_updated_november_2017_x64_dvd_100181918.iso|770267136|0660AFCFE1AC9A62E749194874643E98|/

    来源: MSDN我告诉你 http://msdn.itellyou.cn/
  2. .NET Framework 4.5.2

  3. Visual C++ Redistributable Packages for Visual Studio 2013

  4. Visual C++ Redistributable for Visual Studio 2015

  5. Microsoft.IdentityModel.Extention.dll

Download the required software on the Office Online server

softwareReady

Install Active Directory Domain Services on the AD domain controller server

  1. Open Server Manager, click Add Roles, and select Active Directory Domain Services.

    ADserver

  2. Click Next. In Features, just click Next without selecting anything.

  3. Select the option to automatically restart the server, and then install.

    autoRestartSelect

  4. Wait for the installation to complete.

    installing

  5. After a successful installation, click on the text on the interface to promote this server to a domain controller.

    upgradeToADServer

    If you close this interface midway, you can also find it here.

    upgradeToADServerInFlag

  6. Add a new forest, where the domain name can be filled in with your preferred name, such as wang.me, abc.local, etc., because it will install a DNS server locally and this domain name will also be accessible on this machine.

    newLin

  7. Enter a password here, you can use any password you like, or enter your Windows login password if you are afraid of forgetting it.

    inputPass

  8. In the next step, when prompted that it is unable to create the delegation for the DNS server, just click Next.

    noDNSProxy

  9. Continue to the next step. Here, you can click Next for all steps without making any modifications.

    nextnext

    nextAgain

    nextAgain2

    nextAgain3

  10. In this step, click Install.

    installNow

  11. Then wait for the installation to complete. It will prompt “Your Server Will Be Restarted Soon”. It will restart after this prompt. After the restart, the domain controller installation is completed. After the restart, there will be a longer “Applying computer settings” (If accessed through remote desktop, it will display “Please Wait for Group Policy Client”), wait for about 10 minutes (this issue needs to be resolved by experts).

    The above command can also be executed using Powershell. Refer to the article Deploying the First Domain Controller for Windows Server 2016 for reference.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    Install-WindowsFeature AD-Domain-Services

    Import-Module ADDSDeployment

    Install-ADDSForest `
    -CreateDnsDelegation:$false `
    -DatabasePath "C:\Windows\NTDS" `
    -DomainMode "WinThreshold" `
    -DomainName "{修改这里, 填上域名, 例如ruter.local}" `
    -DomainNetbiosName "{修改这里, 改成域名大写即可, 例如RUTER}" `
    -ForestMode "WinThreshold" `
    -InstallDns:$true `
    -LogPath "C:\Windows\NTDS" `
    -NoRebootOnCompletion:$false `
    -SysvolPath "C:\Windows\SYSVOL" `
    -Force:$true

    rebootADServer

Configure the Office Server and install dependencies

  1. First, change the DNS address of the Office Server to the address of the AD domain controller server. Changing the DNS is a classic operation, so I won’t explain it here. Now we are dealing with the 8GB Office server, the domain controller server should be left alone.

    You can also enter the internal IP address of the domain controller server here. I made a mistake when creating it and couldn’t access the internal network, so I had to enter the external IP address.

    openNetworkShare

    changeDNS

  2. Set the domain to the domain of the domain controller.

    1. Open “This PC” - right-click Properties (also a classic operation, if “This PC” is not on the desktop, you can click the lower left corner of File Explorer, then right-click on “This PC” in the left pane - Properties)

      openProperties

    2. Click on “Remote Settings” or “Advanced system settings” on the left side, then switch to “Computer Name”, and then click “Change”

      prop

    3. Set the domain name here. Click OK. It will prompt for a username and password. Enter the username and login password of the Administrator of the AD domain controller server here. Of course, I haven’t tried other usernames.

      ruter.local)

    4. After entering the password, it will prompt “Welcome to the xxx domain”. Click OK, and it will prompt that the server needs to restart. Choose “Restart now”.

      welcome Ruter.local

Install Office Online 2017

  1. Before that, prepare the required software.

    softwareReady

  2. After the restart, you can follow the instructions in Deploy Office Online Server step by step. First, open PowerShell and install a bunch of components (here, make sure to select the line for Windows Server 2016). This may take some time, so take your time.

    1
    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

    powerShellInstalling

    installed

  3. After the installation is complete, install the dependencies.

    1. The installation order in my case is: NDP452-KB2901954-Web (already installed, skip)

      npd

    2. vc_redist.x64 (Setup Successful)

      vc1

      Of course, if you see a similar image, it means it is already installed, just skip it.

      installed

      1. vcredist_x64 (Setup Successful, I downloaded the English version…)

        vc2

      2. MicrosoftIdentityExtensions-64 (Completed.)

        mie

    3. Double-click cn_office_online_server_last_updated_november_2017_x64_dvd_100181918.iso, it will be mounted to the CD-ROM, then double-click setup to open the installation program.

      installOffice

    4. Because there is only one disk, I didn’t make any changes to the installation directory, so I left it as default (C drive) and continued to install.

      installing

    5. The installation is very fast, it should be done in a few minutes.

      installed

Configure Office Online 2017

  1. Before proceeding, if you have any open PowerShell windows, it is recommended to close all of them and reopen PowerShell.

  2. Continue following the instructions in Deploy Office Online Server. Here, I didn’t install language packs… because…this already looks like Chinese…

  3. Next, follow the steps to deploy the Office Online Server farm. Run this command, replace “servername” with the address you configured. If you access it with a domain name, replace it with the domain name. If you access it with an IP address, replace it with the IP address. Office Online cannot use non-standard HTTP and HTTPS ports. Open PowerShell and enter the following command:

    1
    New-OfficeWebAppsFarm -InternalURL "http://servername" -AllowHttp -EditingEnabled
    1. If you enter a non-standard port, you will see a pop-up like this.

    errorIn8443

    1. If you encounter “Username and password are incorrect”, it means you need to log in with a domain user (Note: At this time, the login password is the login password of your AD domain controller, not the login password of the Office Server server). Thanks to Mr./Ms. fvr for pointing out this issue.

      denied

      1. Logging in with a domain user is very simple. Just log out first, then select “Other user” on the left side, enter the created domain name, and then backslash, followed by Administrator to log in.
        ADDLogin
      2. If using remote login, open “Display options”, modify the username, and add the domain name.
        ADDLogin-Remote
  4. When prompted