An overview of the

Office file online collaborative editing mainly refers to word, Excel, PPT multi-person online collaborative editing, real-time synchronization function;

One of the solutions, sharePoint based secondary development (which can also be implemented based on WOPI), is introduced here. The solution consists of two steps:

  1. Deploy sharepoint
  2. Secondary development based on SharePoint

This article mainly explains the deployment of SharePoint environment, and the subsequent articles will introduce the secondary development of SharePoint and the implementation of WOPI. If you have any questions, please feel free to add QQ group communication at the end of this article.

Deploy sharepoint

All servers are configured for ECS Win Server R2 Data Center Edition

1. Install and configure the domain controller
2. Install and configure Office Online
3. Install and configure SqlServer
4. Install SharePoint

1. Install and configure the domain
  1. Change the names of the domain controller server and client server to facilitate subsequent operations.
  2. Install domain control – Precontrol installation is very simple, there are many reference tutorials online, I will not go into details here.

Matters needing attention:

  1. When another client is added to the domain controller, you are advised to use the client administrator account to increase the domain account of the client to administrator permission for subsequent configuration
  2. You must enable the external IP address of the domain controller server; otherwise, the client server that joins the domain controller does not connect to the Internet. Some installation procedures need to be downloaded online when you install programs on the client
  3. Password policy is enabled on the domain server by default. To disable password policy, click:
Open the Server Manager dashboard. 2. Choose Tools > Group Policy Management. 3. Right-click Default Domain Policy and choose Edit > Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies > Password Policies to modify the DomainCopy the code
2. Install and configure Office Online
  1. Add the Office Online server to the domain
  2. Ensure that the current login domain account is an administrator
  3. Run Powershell as an administrator
Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performa nce,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-A sp-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-FoundationCopy the code
  1. Install the following software
  • .net Framework 4.5.2
  • Visual C++ Redistributable Packages for Visual Studio 2013
  • Visual C++ Redistributable for Visual Studio 2015
  • Microsoft.IdentityModel.Extention.dll
  1. Install the Office Online Server
  2. Install certificates (if you want to use HTTPS externally)
2. File -> Add/Remove Snap-ins -> Select Certificates from the list -> Add -> Select Computer Accounts -> Finish 3. Import the. PFX file. During the import process, select Automatically select storage based on the certificate content. 4Copy the code
  1. The new field

Make sure that the certificate is connected to the external network (if not, you can add forward lookup zone or DNS forward zone in the domain controller), because when verifying the certificate, if there is no connection, you will be prompted to find the certificate

New-OfficeWebAppsFarm -InternalUrl "Intranet address (usually the machine name + domain controller)" -ExternalUrl "Extranet address (IP address, preferably domain name)" -CertificateName "Certificate Friendly Name" -EditingEnabled -OpenFromUrlEnabled

If new-officeWebappsfarm cmdlet cannot be identified, run import-module-name OfficeWebApps

# -openFromurlEnabled is required to access /op/generate.aspx, where you can see a preview of the file (place the file in a shared folder first, /op/generate.aspx

If you need to enable the Office plug-in (a separate article will cover the office plug-in later), do so
Set-OfficeWebAppsFarm -OfficeAddinEnabled

# Close the Office plugin
Set-OfficeWebAppsFarm -OfficeAddinEnabled:$false

Copy the code
  1. Test access host+ /hosting/discovery or /op/generate.aspx
  1. If the configured HTTPS is used, use the HTTPS address
  2. If the file is shared locally, grant the everyone permission to the file
3. Install and configure SQLServer
  1. Add the SQLServer server to the domain
  2. Ensure that the current login domain account is an administrator
  3. Install SQLServer (normal installation can be, meet the need to select the account of the current login == domain account == can be used)
  4. After the installation is complete (SQLServer2016 SSMS need to be downloaded and installed separately), Windows authentication connection into the database, database user add sharePoint server domain account, at the same time add sysadmin role (sharePoint need to build database and table permissions)

Note: The installation process please ensure that the network, if encountered jam (or over the wall or wait… I waited for more than two hours.

4. Install SharePoint
  1. Add the SharePoint server to the domain
  2. Ensure that the current login domain account is an administrator
  3. Ensure a smooth Network
  4. Ready to install screen first file (can also be performed manually in the installation package prerequisiteinstaller. Exe)
  5. Perform the installation
  6. Select create new field (first install, there will be no field, so select it)
  7. Database Server enter the IP address of the SQLServer Server (machine name + domain controller). (if the default instance name is used when SQLServer is installed, enter the instance name in the address.)
  8. The database login account is the SharePoint server domain account
  9. Enter the password of the server farm
  10. Server farm Role Selects a single server farm
  11. Change the port number (otherwise, each manager port is random)
  12. Follow the configuration wizard to configure the first Web application in SharePoint
  13. If you don’t use SharePoint search, you’d better turn it off because it takes up too much memory. Here’s how:
# Disable the following two services in Windows services
SharePoint Search Host Controller
SharePoint Server Search 16

Get the service ID from the shapoint command window using get-spServiceinstance, stop-spServiceinstance Stop the service (Search host controller service, SharePoint Server Search, Search) Query and Site Setting...)PS C:\Users\SPAdmin> Get-SPServiceInstance .... PS C:\Users\SPAdmin> Stop -spserviceinstance -identity {Identity} // Get -spserviceinstance or the ID of the commandCopy the code

At this point, SharePoint is installed and you can preview the Web application you just created with the Configuration wizard in your browser. Next, configure the association between SharePoint and the Office Online server

  1. Certificate of installation
  2. Create a binding between SharePoint and Office Online
New-SPWOPIBinding -ServerName <WacServerName> 

# Remember, if you want to use SharePoint outside the domain controller, WacServerName please fill in the external address of the Office Online field (if this address is HTTP, Please set get-spwopizone to external-http)

Set-SPWOPIZone -zone "external-https" Use HTTPS to access the Internet

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

The URL is the external office online address

Copy the code
  1. If the configuration is incorrect, use the following command to delete the configuration
Remove-SPWOPIBinding -All:$true
Copy the code

This is where the sharePoint and Office Online binding is configured and we’re going to test the file preview

  1. Create A website set in SharePoint and specify the website set administrator A. USER A cannot be A SharePoint account
  2. Enter the newly created website set, log in with account A, upload A document, you can preview and edit
  3. If you want to access from outside the domain, choose System Settings > Configure Secondary Access mapping to configure the corresponding address

That’s all the configuration is done, which leads to the next article, how do you do secondary development

  1. First of all, SharePoint is based on Windows authentication. Users involved in the development process are generally not in the domain. Different business systems will have their own user reminders, so it is necessary to adapt the user system of the business system to sharePoint users. This process can be achieved through SHAREPoint Form based AD authentication
  2. The configuration of the development environment, how should we configure VS in the secondary development of SharePoint
  3. How do we expose SharePoint apis through our own services
  4. Secondary development of some specific matters needing attention
  5. .

conclusion

I wanted to sort out this series of articles for a long time. After realizing the connection between SharePoint and business system, I found that although sharePoint’s file co-editing was perfect and secondary development was not difficult, it also had many fatal shortcomings, such as high server cost and difficult deployment, so I studied WOPI again. At present, there are mature cases based on these two solutions, interested friends can add the following QQ group together to discuss, if there are enterprise friends need to cooperate, directly add QQ: 779393868.