Brendan McKenzie

Installing Sitecore 9 Manually

Wednesday, 21 March 2018

All Sitecore documentation directs users to use the SIF or SIF-less tools to install Sitecore.

This isn't a valid approach in certain circumstances such as CI pipeline builds or environments where installing Powershell modules is not possible/permitted.

Through a lot of wasted hours, hair pulling and odd feedback from Sitecore support I managed to get Sitecore up and running.

The situation I was dealing with was a hosting environment running Windows Server 2012 R2 that didn't allow me to install the SIF Powershell module. I also had pre-existing certificates I wanted to use for client certificate authentication with xConnect.

My solution to this was to use the SIF tool to install Sitecore locally, then copy it up. Instead of using SIF to do the installation locally, you could also download the "ZIP archive of the Sitecore site root folder" and work with that.

Topologies

A short note on topologies as they were not explained in an obvious manner.

The topology I am working with in this installation is XP0.

Installation

This is the process I followed.

  1. Install SIF on your local development machine
  2. Install Java
  3. Install SOLR locally
  4. Download the "Packages for XP Single" archive
  5. Run SIF for xconnect-solr.json
  6. Run SIF for sitecore-solr.json
  7. Run SIF for xconnect-xp0.json
  8. Run SIF for sitecore-xp0.json

At this point you should have Sitecore running at http://sitecore9-website/ and xConnect running at https://sitecore9-xconnect/ on your local machine. The next step is to package this up and deploy it to a remote hosting environment.

  1. Backup and archive all the databases (prefixed with SC90_)
  2. Archive the C:\inetpub\wwwroot\sitecore9-website\ folder
  3. Archive the C:\inetpub\wwwroot\sitecore9-xconnect\ folder
  4. Archive the C:\solr\solr-6.6.2\server\solr\SC90_* folders
  5. Copy all these archives to their intended destination
  6. Install your certificate on the servers that will run Sitecore and xConnect, ensure you're using a certificate that includes its private key (i.e., a p12/pfx certificate)
  7. On the Sitecore XP server, extract the sitecore9-website archive to its destination
  8. Create an IIS website pointed at that directory
  9. On the xConnect server, extract the sitecore9-xconnect archive to its destination
  10. Create an IIS website pointed at that directory
    • This website will need an SSL binding
    • This website will also need to be configured to handle client certificates
    • Open IIS Manager
    • Browse to the website
    • Open SSL Settings
    • Check the "Require SSL" box
    • Change "Client certificates" to "Require"
  11. Restore all the databases on the database server
  12. Update the [__ShardManagement].[ShardsGlobal] table in the SC90_Xdb.Collection.ShardMapManager database
    • The [ServerName] field will need to be updated
  13. Update the connection strings in the sitecore9-website and sitecore9-xconnect websites
    • The xConnect connection strings in the sitecore9-website will need to be updated to point at the new sitecore9-xconnect site
  14. Update the SOLR endpoint URL, this can be patched in to the ContentSearch.Solr.ServiceBaseAddress Sitecore setting

Now the websites should be running in their intended environment. The next step is to setup the background xConnect services.

  1. Download the nssm tool on the server that will be running the services.
  2. Update the ConnectionStrings.config file in the sitecore9-xconnect\App_data\jobs\continuous\* folders
  3. Run nssm.exe install "Sitecore XConnect IndexWorker" full-path-to\sitecore9-xconnect\App_data\jobs\continuous\IndexWorker\XConnectSearchIndexer.exe
  4. Run nssm.exe install "Sitecore XConnect AutomationEngine" full-path-to\sitecore9-xconnect\App_data\jobs\continuous\AutomationEngine\maengine.exe
  5. Run net start "Sitecore XConnect IndexWorker"
  6. Run net start "Sitecore XConnect AutomationEngine"

Finally, the Sitecore environment should now be running in a stable state. In my instance the sitecore9-website folder will be dynamic and change on each deployment of the application; the original sitecore9-website folder will be used as a template where our updates will be deployed into.

The assumptions made for this process are below.

Gotcha's

Recommendations