安装 office online server:https://docs.microsoft.com/zh-cn/officeonlineserver/deploy-office-online-server

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

查看是否安装.net 4.8:

Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)\p{L}'} | Select PSChildName, version

下载安装以下软件:
Start-BitsTransfer  -Source  https://download.microsoft.com/download/F/3/5/F3500770-8A08-488E-94B6-17A1E1DD526F/vcredist_x64.exe  -Destination ~\Downloads\

Start-BitsTransfer  -Source  https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe  -Destination ~\Downloads\

Start-BitsTransfer  -Source  https://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/MicrosoftIdentityExtensions-64.msi  -Destination ~\Downloads\

Import-Module -Name OfficeWebApps

New-OfficeWebAppsFarm -InternalUrl "https://oos.afd.ink" -ExternalUrl "https://oos.afd.ink" -CertificateName "OOS-CA" -EditingEnabled


https://oos.afd.ink/hosting/discovery


https://oos.afd.ink/op/generate.aspx