commerce

Sitecore Commerce 9 Update 3 – Step by step Install Guide on your machine

This one is a summary of my own experience for Sitecore Experience Commerce 9 Update 3 (aka Sitecore XC 9.0.3) 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 play around with Sitecore Install Framework (SIF) version 2.0

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 master and core databases if not yet:
    • on the Sitecore Launchpad, click Control Panel, and in the Database section, 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 Indexing section, click Indexing manager
    •  in the Indexing Manager dialog box, click Select all, and then click Rebuild
    • sxc902_7
  4. DO NOT stop the xConnect site sc903com.xconnect.local
    • from the installation guide with love (Page 10)
    • xc903_1
    • ensure that Experience Analytics is working properly
      • This slideshow requires JavaScript.

      • 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
  5. create a new folder D:\sc903_com_install
  6. create a certificate for the Sitecore Commerce Engine Connect to authenticate with the Sitecore XC Engine:
    • launch PowerShell as an administrator
    • create the certificate by running the following cmdlet:
      • New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname “storefront.local”
    • export the certificate to a file by running the following cmdlet:
      • Export-Certificate -Cert cert:\localMachine\my\<Thumbprint-of-cert> -FilePath D:\sc903_com_install\storefront.local.cer
    • xc903_6
  7. 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:\sc903_com_install
  8. download Sitecore Experience Accelerator 1.8.0 for Sitecore 9.0 (Note: must log into https://dev.sitecore.net/ before downloading) and put it into D:\sc903_com_install
  9. download Sitecore Powershell Extensions 4.7.2 then put it into  D:\sc903_com_install
  10. download and unzip Packages for On Premise 2018.12-2.4.63 (Note: must log into https://dev.sitecore.net/ before downloading) then put it into D:\sc903_com_install
  11. unzip D:\sc903_com_install\SIF.Sitecore.Commerce.1.4.7.zip and then rename D:\sc903_com_install\SIF.Sitecore.Commerce.1.4.7 to D:\sc903_com_install\SIF for a better practice
  12. unzip the D:\sc903_com_install\Sitecore.BizFX.1.4.1.zip
  13. unzip the D:\sc903_com_install\Sitecore.Commerce.Engine.SDK.2.4.43.zip file then copy the D:\sc903_com_install\Sitecore.Commerce.Engine.SDK.2.4.43\Sitecore.Commerce.Engine.DB.dacpac file into D:\sc903_com_install
  14. download sc903_com_install.ps1 and put it into D:\sc903_com_install\SIF then open it to correct the following parameters:
    • $SitePrefix
    • $ScInstallDirectory
    • $SiteHostHeaderName
    • $SqlServer
    • $CommerceEngineCertificatePath
    • $SolrUrl
    • $SolrRoot
    • $SolrService
  15. open D:\sc903_com_install\SIF\Configuration\Commerce\Solr\sitecore-commerce-solr.json to change the Name attribute to name  in order to make it work properly with SIF 2.0
    • xc903_3
  16. (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 74-75 of sc903_com_install.ps1
    • xc903_13.png
  17. let’s install it
    • launch PowerShell as an administrator
    • change directory to D:\sc903_com_install\SIF
    • execute .\sc903_com_install
    • xc903_10.png
    • hopefully there is nothing can stop the installation process now
    • xc903_9
  18. open a browser then navigate to storefront.local/, you would see the default page of Sitecore webiste. That’s because we don’t use the default host name sxa.storefront.com so we need to correct it inside Sitecore
    • log into sc903com.local/sitecore/
    • access /sitecore/content/Sitecore/Storefront/Settings/Site Grouping/Storefront
    • update Host Name to storefront.local and then publish it
    • sc9com_8.png
    • refresh storefront.local/, you would see something like this
    • sxc902_9.png
  19. DO NOT forget to perform Post-Installation Steps

How to uninstall it?

  • download sc903_com_uninstall.ps1 and put it into D:\sc903_com_install then open it to correct 07 parameters below:
    1. $EngineSuffix
    2. $Prefix
    3. $SolrService
    4. $PathToSolr
    5. $SqlServer
    6. $SqlAccount
    7. $SqlPassword
  • launch PowerShell as an administrator
  • change directory to  D:\sc903_com_install
  • execute .\sc903_com_uninstall
    • xc903_11.png
  • hopefully, it runs well and cleans everything up

Note: some known issues

  1. Missing required parameter: name
    • xc903_1
    • open D:\sc903_com_install\SIF\Configuration\Commerce\Solr\sitecore-commerce-solr.json to change the Name attribute to name  in order to make it work properly with SIF 2.0
  2. The service cannot accept control messages at this time
    • xc903_7.png
    • access IIS, start sc903com.local site and sc903com.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. Something went wrong restarting SQL server again: Cannot validate argument on parameter ‘InputObject’. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
    • sc9com_22
    • somehow SQL Server window service cannot restart after stopping, ensure SQL Server window service is running
  4. ERROR Exception when executing agent aggregation/pathAnalyzerHistoryAgent
    Exception: Sitecore.XConnect.XdbCollectionUnavailableException
    Message: The HTTP response was not successful: Forbidden
    Source: Sitecore.Xdb.Common.Web

    • have a look at https://sitecorecorner.com/2017/10/25/sitecore-9-xconnect-ssl-and-that-403-forbidden/
    • ensure to remove all non-self-signed certificates out of Trusted Root Certification Authorities certificate store (you can move them to Intermediate Certification Authorities certificate store)
      • Note: should use this Windows Powershell command Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_.Subject} to find them out

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 Installation!

9 thoughts on “Sitecore Commerce 9 Update 3 – Step by step Install Guide on your machine

  1. am facing issue number 2, you said regarding this that you may need to do it several times, but i have been doing it for the past half an hour and still the script is stopping the application, then i have to restart the application, then again the script is stopping the application. I don’t know how to proceed?

    Like

  2. Hi Viet Hoang.
    When I install commerce 9.0.3 in sitecore 9.1.0, always quote certificate errors, for example, ‘CertEnroll: : CSignerCertificate: : Initialize: always find a object or property. 0x80092004 (2146885628 CRYPT_E_NOT_FOUND) ’, I’m asking you this question how to solve?Is this a certificate issue or is commerce 9.0.3 incompatible with sitecore 9.1.0?

    Like

    1. Hi Feng,

      Very likely it’s certificate issue (however, it’s out of my experience). By the way, Sitecore XC 9.0.3 should go with Sitecore XP 9.0 Update 2 (aka 9.0.2) for the best compatibility match.

      Like

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.