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:
- Sitecore XC9 installation
- Sitecore XC9 Update 1 installation
- Sitecore XC9 Update 2 installation
- Sitecore XC9 Update 3 installation
- Sitecore XC 9.1 Initial Release installation
so I decided to go only with:
- Installation Guide – WDP for On Premise (Thanks Sitecore team!)
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:
- Windows 10
- Sitecore Experience Platform 9.2 Initial Release
- Sitecore Experience Accelerator 1.9.0 (Note: must log into https://dev.sitecore.net/ before downloading)
- Sitecore PowerShell Extensions 5.0 for Sitecore 9.2 (Note: must log into https://dev.sitecore.net/ before downloading)
- Packages for On Premise WDP 2019.07-4.0.165 (Note: must log into https://dev.sitecore.net/ before downloading)
- Redis 3.0.504
Step-by-step guide
- install the ones below if not yet 😀
- a fresh Sitecore XP 9.2 Initial Release instance , let’s say storefront920.local and storefront920.xconnect.local (xConnect site)
- download and install Redis 3.0.504
- 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
- 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
- ensure that Experience Analytics is working properly
- 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
- (optional) once it’s configured for HTTPS/SSL so 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
- DON’T FORGET to do IIS reset
- create a new folder D:\sc920_com_install
- 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
- 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
- download Sitecore PowerShell Extension 5.0 for Sitecore 9.2 then put it into D:\sc920_com_install
- 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
- unzip D:\sc920_com_install\SIF.Sitecore.Commerce.3.0.28 and then rename D:\sc920_com_install\SIF.Sitecore.Commerce.3.0.28 to D:\sc920_com_install\SIF for a better practice
- override the following files in order to inject the custom install directory of Sitecore Identity Server
- open raw and then copy / paste Master_SingleServer.json into D:\sc920_com_install\SIF\Configuration\Commerce
- open raw and then copy / paste IdentityServer.Config.json into D:\sc920_com_install\SIF\Configuration\Commerce\IdentityServer
- (optional) download + unzip Configuration.zip and then copy / paste all to D:\sc920_com_install\SIF
- Note: we cannot use CommerceInstallRoot parameter in this case, otherwise you may get the issue “Cannot find path \CommerceOps_Sc920.local\wwwroot\config.json because it does not exist”
- download sc920_com_install.ps1 and 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
- (optional) correct the SitecoreUserName and SitecoreUserPassword of your Sitecore XP 9.2.0 instance if you’re using others rather than the default ones
-
- (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 sc920_com_install.ps1
- let’s install it
- Note: ensure that there is NO custom AllowedCorsOriginsGroup in D:\sc920_com_install\SIF\IdentityServer\Sitecore.Commerce.IdentityServer.Host.xml (they’re added automatically in prior installations)
- launch PowerShell as an administrator
- change directory to D:\sc920_com_install\SIF
- execute .\sc920_com_install
- hopefully there is nothing can stop the installation process now
- Note: ensure that there is NO custom AllowedCorsOriginsGroup in D:\sc920_com_install\SIF\IdentityServer\Sitecore.Commerce.IdentityServer.Host.xml (they’re added automatically in prior installations)
- 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 sxa.storefront.com so we need to correct it via Sitecore
- log into https://storefront920.local/sitecore/
- access /sitecore/content/Sitecore/Storefront/Settings/Site Grouping/Storefront
- update Host Name to storefront920.local and Database to master
- (optional) not check the checkbox Cache Html and select Yes for Disable Browser Caching for a better practice
- refresh https://storefront920.local/ and then add some products, you would see something like this
- DO NOT forget to perform Post-Installation Steps
- follow Post-Installation Steps (from Page 19) in Installation Guide – WDP for On Premise
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\sc920_com_install.ps1 and uncomment the line 103 + comment out the line 100 then save it
- Note: DO NOT FORGET to restore D:\sc920_com_install\SIF\Configuration\Commerce\Master_SingleServer.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
- hopefully, it runs well and cleans everything up
Note: some known issues
- The service cannot accept control messages at this time
- my suggestion: access IIS, start storefront920.local site 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
- App Pool ‘storefront920.local’ has stuck in Stopping state
- my suggestion: access IIS, start storefront920.local site 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
- The remote server returned an error : (400) Bad Request
- my suggestion 1: you should perform Step 12 or ensure that \storefront920.identityserver.local\Config\production\Sitecore.Commerce.IdentityServer.Host.xml is existent
- my suggestion 2: try doing IIS Reset and then perform the current install step again
- 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
- somehow SiteUtilityPages folder is removed after performing some tasks so we have to restore it by copying SiteUtilityPages from SIF.Sitecore.Commerce.3.0.28.zip and then paste it to D:\sc920_com_install\SIF
- The MERGE statement attempted to UPDATE or DELETE the same row more than once
- my suggestion is to remove all prior modules completed + Module-HabitatImages itself (in this case) from D:\sc920_com_install\SIF\Configuration\Commerce\Master_SingleServer.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!
Hello, Thanks for this nice article. I am trying to install commerce following steps mentioned in this article and receive following error whilst I execute the script. The script execution stops literally in a second. Checked logs but couldn’t find anything useful.
Script stops with following, are you able to suggest what might be the issue-
Resetting registered extensions
Registering ConfigFunction extension ‘And’ => ‘Invoke-AndConfigFunction’
Registering Task extension ‘AppPool’ => ‘Invoke-AppPoolTask’
Registering Task extension ‘Command’ => ‘Invoke-CommandTask’
Registering ConfigFunction extension ‘Concat’ => ‘Invoke-ConcatConfigFunction’
Registering Task extension ‘Copy’ => ‘Invoke-CopyTask’
Registering Task extension ‘CreateService’ => ‘Invoke-CreateServiceTask’
Registering Task extension ‘DownloadFile’ => ‘Invoke-DownloadFileTask’
Registering Task extension ‘EnsurePath’ => ‘Invoke-EnsurePathTask’
Registering ConfigFunction extension ‘Environment’ => ‘Invoke-EnvironmentConfigFunction’
Registering ConfigFunction extension ‘Equal’ => ‘Invoke-EqualConfigFunction’
Registering Task extension ‘FilePermissions’ => ‘Invoke-FilePermissionsTask’
Registering ConfigFunction extension ‘GetCertificate’ => ‘Invoke-GetCertificateConfigFunction’
Registering ConfigFunction extension ‘GetCertificateThumbprint’ => ‘Invoke-GetCertificateThumbprintConfigFunction’
Registering Task extension ‘HostHeader’ => ‘Invoke-HostHeaderTask’
Registering Task extension ‘HttpRequest’ => ‘Invoke-HttpRequestTask’
Registering ConfigFunction extension ‘If’ => ‘Invoke-IfConfigFunction’
Registering Task extension ‘IISConfiguration’ => ‘Invoke-IISConfigurationTask’
Registering Task extension ‘IoXml’ => ‘Invoke-IoXmlTask’
Registering ConfigFunction extension ‘Join’ => ‘Invoke-JoinConfigFunction’
Registering ConfigFunction extension ‘JoinPath’ => ‘Invoke-JoinPathConfigFunction’
Registering Task extension ‘ManageAppPool’ => ‘Invoke-ManageAppPoolTask’
Registering Task extension ‘ManageService’ => ‘Invoke-ManageServiceTask’
Registering Task extension ‘ManageSolrConfig’ => ‘Invoke-ManageSolrConfigTask’
Registering Task extension ‘ManageSolrCore’ => ‘Invoke-ManageSolrCoreTask’
Registering Task extension ‘ManageSolrSchema’ => ‘Invoke-ManageSolrSchemaTask’
Registering Task extension ‘ManageWebsite’ => ‘Invoke-ManageWebsiteTask’
Registering ConfigFunction extension ‘Not’ => ‘Invoke-NotConfigFunction’
Registering ConfigFunction extension ‘Or’ => ‘Invoke-OrConfigFunction’
Registering ConfigFunction extension ‘ReadJson’ => ‘Invoke-ReadJsonConfigFunction’
Registering Task extension ‘RemoveService’ => ‘Invoke-RemoveServiceTask’
Registering ConfigFunction extension ‘ResolveCertificatePath’ => ‘Invoke-ResolveCertificatePathConfigFunction’
Registering ConfigFunction extension ‘ResolvePath’ => ‘Invoke-ResolvePathConfigFunction’
Registering Task extension ‘SetXml’ => ‘Invoke-SetXmlTask’
Registering Task extension ‘SitecoreUrl’ => ‘Invoke-SitecoreUrlTask’
Registering ConfigFunction extension ‘SqlConnectionString’ => ‘Invoke-SqlConnectionStringConfigFunction’
Registering Task extension ‘TransformXmlDoc’ => ‘Invoke-TransformXmlDocTask’
Registering Task extension ‘Unpack’ => ‘Invoke-UnpackTask’
Registering Task extension ‘WebBinding’ => ‘Invoke-WebBindingTask’
Registering Task extension ‘WebDeploy’ => ‘Invoke-WebDeployTask’
Registering Task extension ‘WebRequest’ => ‘Invoke-WebRequestTask’
Registering Task extension ‘WebsiteClientCert’ => ‘Invoke-WebsiteClientCertTask’
Registering Task extension ‘WebSite’ => ‘Invoke-WebSiteTask’
Registering Task extension ‘SitecoreConfiguration’ => ‘Install-SitecoreConfiguration’
Registering Task extension ‘ImportCertificate’ => ‘Import-Certificate’
Registering Task extension ‘AddWebFeatureHSTS’ => ‘Add-WebFeatureHSTS’
Registering Task extension ‘AddWebFeatureHTTPSOnly’ => ‘Add-WebFeatureHTTPSOnly’
Registering Task extension ‘AddWebFeatureSSL’ => ‘Add-WebFeatureSSL’
Registering Task extension ‘GetWebFeature’ => ‘Get-WebFeature’
Registering Task extension ‘NewRootCertificate’ => ‘New-RootCertificate’
Registering Task extension ‘NewSignedCertificate’ => ‘New-SignedCertificate’
Registering Task extension ‘RemoveWebFeatureHSTS’ => ‘Remove-WebFeatureHSTS’
Registering Task extension ‘RemoveWebFeatureHTTPSOnly’ => ‘Remove-WebFeatureHTTPSOnly’
Registering Task extension ‘RemoveWebFeatureSSL’ => ‘Remove-WebFeatureSSL’
Registering Task extension ‘TestWebFeatureHSTS’ => ‘Test-WebFeatureHSTS’
Registering Task extension ‘TestWebFeatureHTTPSOnly’ => ‘Test-WebFeatureHTTPSOnly’
Registering Task extension ‘TestWebFeatureSSL’ => ‘Test-WebFeatureSSL’
Registering task parameter map
WarningAction => Continue
Verbose => Continue
InformationAction => Continue
WhatIf => False
Debug => SilentlyContinue
ErrorAction => Stop
Configuration contains no tasks
[TIME] 00:00:01
[TIME] 00:00:01
Windows PowerShell transcript end
End time: 20190823044312
LikeLike
Hi Viet,
This is a nice blog and using this blog I installed commerce in my local system.
But I want Sitecore commerce without using the SXA storefront. Can you guide me on how I can do that? is there any blog for that?
Also, can we use XC 9.2 without SXA?
LikeLike
Hi Mitesh,
Please have a look at the installation guide (probably Page 16) to know how to install XC without the SXA Storefront. By the way, SXA framework is required for Sitecore XC.
LikeLike
Hi Viet,
Thanks for your prompt reply.
So, the SXA framework is required for XC, But can we create the XC website without using the SXA page layout and variant.
Can we use our controller and view rendering and developed commerce website.
Is there any reference blog or link or GitHub solution to develop a commerce website without using SXA?
LikeLike
Hi Mitesh,
I highly recommend you to join Sitecore Slack: https://sitecorechat.slack.com/ (especially commerce channel, you can register here https://docs.google.com/forms/d/e/1FAIpQLScsJX9PC3m8u-labRn_BNnByR0aiAxPYowN-doed6_t45aPhg/viewform) and then post your query there.
LikeLike
Install Salesforce package will lead me to an error TrackerNotAvailableException. Because it tries to add a facet named “SalesforceCampaignMembership” but does not have dll for it. Disable Sitecore.DataExchange.Tools.SalesforceConnect.Local.config will fix this error
LikeLiked by 1 person
Thanks for sharing 🙂
LikeLike
Hi Viet,
This is a simple and very easily explained guide.
Can you add a note to Point no 8 where we copy Microsoft.Web.XmlTransform.dll file into D:\sc920_com_install. The file needs to be unblocked on windows machine or it gives an error:
Could not load file or assembly ‘file:Microsoft.Web.XmlTransform.dll’ or one of its dependencies. Operation is not supported.
Reference: https://sitecore.stackexchange.com/questions/13784/sitecore-commerce-installation-error-in-opening-microsoft-web-xmltransform-dll
LikeLike