Sitecore Commerce 9.2 Initial Release – Step by step Install Guide on your machine

installation

This one is a summary of my own experience for Sitecore Experience Commerce 9.2 Initial Release (aka Sitecore XC 9.2.0) installation on my machine. I’ve had much experience in the following ones:

so I decided to go only with:

I do hope that this blog post is helpful for your own journey as well.

Note: personally, I wanted to use my own install directory rather than the default one

Setup Prerequisites

Please refer to the Sitecore Experience Commerce 9 Compatibility Table for the software and version prerequisites:

Step-by-step guide

  1. install the ones below if not yet
  2. rebuild the Link databases for the masterand core databases if not yet:
    • on the Sitecore Launchpad, click Control Panel, and in the Databasesection, click Rebuild Link Databases
    • select the master and core databases and then click Rebuild
    • sc9com_1
  3. rebuild the search indexes if not yet:
    • on the Sitecore Launchpad, click Control Panel, and in the Indexingsection, click Indexing manager
    • in the Indexing Manager dialog box, click Select all, and then click Rebuild
    • sxc902_7
  4. ensure that Experience Analytics is working properly
    • pic3 2 -
    • pic4 2 -
    • Note: if there is any error
      • option 1: you will have to solve it before installing XC by opening the Sitecore log and then having a look at the error messages (normally, they’re certificate issues)
      • option 2: you may want to disable xDB and then fix the error later after installing XC successfully
  1. (optional) once it’s configured for HTTPS/SSLso we should open \storefront920.identityserver.local\Config\production\Sitecore.IdentityServer.Host.xml and then add a new AllowCorsOriginsGroup to that file like this if not yet
    • pic5 -
    • DON’T FORGET to do IIS reset
  2. create a new folder D:\sc920_com_install
  3. download MSBuild Microsoft Visual Studio Web targets(available from Nuget) then extract the Web targets package, copy the \tools\VSToolsPath\Web\Microsoft.Web.XmlTransform.dll file into D:\sc920_com_install
  4. download Sitecore Experience Accelerator 1.9.0 for Sitecore 9.2(Note: must log into https://dev.sitecore.net/ before downloading) and put it into D:\sc920_com_install
  5. download Sitecore PowerShell Extension 5.0 for Sitecore 9.2then put it into  D:\sc920_com_install
  6. download and unzip Packages for On Premise WDP 2019.07-4.0.165(Note: must log into https://dev.sitecore.net/ before downloading) then put it into D:\sc920_com_install
  7. unzip D:\sc920_com_install\Sitecore.Commerce.3.0.28and then rename D:\sc920_com_install\SIF.Sitecore.Commerce.3.0.28 to D:\sc920_com_install\SIF for a better practice
  8. override the following filesin order to inject the custom install directory of Sitecore Identity Server
    • open raw and then copy / paste jsoninto D:\sc920_com_install\SIF\Configuration\Commerce
    • xc920_6
    • open raw and then copy / paste Config.jsoninto D:\sc920_com_install\SIF\Configuration\Commerce\IdentityServer
    • xc920_7
    • (optional)download + unzip  zip and then copy / paste all to D:\sc920_com_install\SIF
    • Note: we cannot use CommerceInstallRootparameter in this case, otherwise you may get the issue “Cannot find path \CommerceOps_Sc920.local\wwwroot\config.json because it does not exist”
    • xc920_4
  9. download ps1and put it into D:\sc920_com_install\SIF then open it to correct the following parameters:
    • $SiteNamePrefix
    • $ScInstallDirectory
    • $SiteHostHeaderName
    • $SqlServer
    • $SqlUser
    • $SqlPass
    • $SolrUrl
    • $SolrRoot
    • $SolrService
  10. (optional)correct the SitecoreUserName and SitecoreUserPassword of your Sitecore XP 9.2.0 instance if you’re using others rather than the default onespic9 -
  1. (optional) you can specify any local account (note: it will be created automatically if non-existent)to be set up for the various application pools that are created as part of the deployment at line 83-84 of ps1xc920_16
  2. let’s install it
    • Note: ensure that there is NOcustom AllowedCorsOriginsGroup in D:\sc920_com_install\SIF\IdentityServer\Sitecore.Commerce.IdentityServer.Host.xml (they’re added automatically in prior installations)
      • pic11 -
    • launch PowerShell as an administrator
    • change directory to D:\sc920_com_install\SIF
    • execute .\sc920_com_install
    • xc920_18
    • hopefully there is nothing can stop the installation process now
    • xc920_14
  3. open a browser then navigate to https://storefront920.local/, you would see the default page of Sitecore website. That’s because we don’t use the default host name storefront.comso we need to correct it via Sitecore
    • log into https://storefront920.local/sitecore/
    • access /sitecore/content/Sitecore/Storefront/Settings/Site Grouping/Storefront
    • update Host Nameto local and Database to master
    • xc920_20
    • (optional) not check the checkbox Cache Htmland select Yes for Disable Browser Caching for a better practice
    • sc910com_17
    • refresh https://storefront920.local/and then add some products, you would see something like this
    • xc920_13
  4. DO NOTforget to perform Post-Installation Steps

The recommendation

We can remove the modules completed from D:\sc920_com_install\SIF\Configuration\Commerce\Master_SingleServer.json and re-do Step 16 if there is something wrong (especially for Note: some known issues below) so that we are able to save a lot of time

How to uninstall it?

  • open D:\sc920_com_install\SIF\ps1and uncomment the line 103 + comment out the line 100 then save it
  • pic17 1 -
  • Note: DO NOT FORGETto restore D:\sc920_com_install\SIF\Configuration\Commerce\json if you already edited it for removing the modules completed via the install operations
  • open Windows PowerShell (run as administrator)
  • change directory to D:\sc920_com_install\SIF
  • execute .\sc920_com_install
  • xc920_10
  • hopefully, it runs well and cleans everything up

Note: some known issues

  1. The service cannot accept control messages at this time
    • xc920_11
    • my suggestion: access IIS, start localsite and storefront920.local application pool manually (note: you may need to do it several times) if they’re in STOP status, somehow IIS cannot restart those ones after stopping them
  2. App Pool ‘storefront920.local’ has stuck in Stopping state
    • xc920_22
    • my suggestion: access IIS, start localsite and storefront920.local application pool manually (note: you may need to do it several times) if they’re in STOP status, somehow IIS cannot restart those ones after stopping them
  3. The remote server returned an error : (400) Bad Request
    • xc920_12
    • my suggestion 1: you should perform Step 12 or ensure that \storefront920.identityserver.local\Config\production\Sitecore.Commerce.IdentityServer.Host.xmlis existent
    • xc920_8
    • my suggestion 2: try doing IIS Reset and then perform the current install step again
  4. Cannot validate argument on parameter ‘Source’. The ” Test-Path $_ ” validation script for the argument with value “D:\sc920_com_install\SIF\SiteUtilityPages” did not return a result of True
    • xc920_19
    • somehow SiteUtilityPagesfolder is removed after performing some tasks so we have to restore it by copying SiteUtilityPages from Sitecore.Commerce.3.0.28.zip and then paste it to D:\sc920_com_install\SIF
  5. The MERGE statement attempted to UPDATE or DELETE the same row more than once
    • Text
    • my suggestion is to remove all prior modules completed + Module-HabitatImages itself (in this case) from D:\sc920_com_install\SIF\Configuration\Commerce\json and re-do Step 16

Got issues?

Please send your issues (with screenshots if possible) to viet.hoang.sitecore@gmail.com so that I have a chance to understand your problem and be able to suggest the solution.

Happy Sitecore Commerce Installation!

This article originally appeared on Walking on clouds (https://buoctrenmay.com/).