commerce · installation

How to install Sitecore Commerce 9 Update 2 on Windows Server 2012 R2

As you all know that Sitecore Experience Commerce is not compatible with Windows Server 2012 R2 (have a look at Sitecore Experience Commerce compatibility). Unfortunately, we have only Windows Server 2012 R2 on our plate and the physical servers are full so we should wait for the new one. In the meantime, I’ve managed to get around and have installed it successfully (at least in my opinion). The following steps are my own experience so you should play around with it at your own risk 😀

xcw_6

  1. assume that you follow this guide to install Sitecore XC 9.0.2 on your Windows 10 successfully 😀
  2. Note: the Windows Cmdlet: New-SelfSignedCertificate on Windows Server 2012 R2 does not have a parameter called Signer so we have to export the following certificates (pfx files) to get around:
    • storefront.local or the one you generated in Step 1
    • identity.server (Friendly Name: Sitecore Identity Server)
    • localhost (Friendly Name: Sitecore Commerce Services SSL Certificate)
  3. let’s export the certificates above
    • press Windows + R (aka Windows Run command), enter mmc to Open box then press OK button to open Microsoft Management Console dialog
    • press Ctrl+M (aka menu File \ Add or Remove Snap-insto open Add or Remove Snap-ins dialog then add Certificates to Selected snap-in
    • xcw_1

      xcw_4.png

  4. log into your Windows Server 2012 R2
  5. import all the certificates (pfx files) in Step 2 to the Trusted Root Certification Authorities certificate store
    • xcw_2
  6. highly recommend to use Sitecore.HabitatHome.Utilities to install a fresh Sitecore XP 9.0.2 because it helps create self-signed certificates on Windows Server 2012 R2 and you will be able to install Habitat Home + Habitat Home Commerce easily later
    • Note 1: you may need to make the sever support TLS if not yet by referring to this article
    • Note 2: you may get the error message “Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send.” so following this one to overcome it
      • Ex: add [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 to Sitecore.HabitatHome.Utilities\XP\install\install-xp0.ps1 in order to force TLS1.2
      • xcw_3.png
    • Note 3: you may want to follow Step 1-9 in this guide to set it up
  7. assume that you follow this guide to install Sitecore XC 9.0.2 on Windows Server 2012 R2
    • Note 1: ensure that the physical path of xConnect site is same as the one in Step 6 (Ex: C:\inetpub\wwwroot\storefront_xconnect.local), otherwise you would see this error message:
      • ERROR Exception when executing agent aggregation/aggregator
        Exception: Sitecore.XConnect.Client.XdbModelConflictException
        Message: One or more local models conflict with the xDB service layer.
        ‘RegisterConnectEventModel, 0.1’ does not have a remote version
        Source: Sitecore.Xdb.Common.Web
      • my suggestion for a quick fix is to copy / paste the 06 following files of xConnect site from Windows 10 to Windows Server 2012 R2
        1. \App_data\jobs\continuous\IndexWorker\App_data\Models\Sitecore.Commerce.Connect.XConnect.Models.json
        2. \App_data\Models\Sitecore.Commerce.Connect.XConnect.Models.json
        3. \App_data\jobs\continuous\AutomationEngine\Sitecore.Commerce.Connect.MarketingAutomation.Rules.dll
        4. \App_data\jobs\continuous\AutomationEngine\Sitecore.Commerce.Connect.Collection.Model.dll
        5. \App_data\jobs\continuous\AutomationEngine\App_Data\Config\sitecore\Segmentation\sc.Commerce.MarketingAutomation.Conditions.xml
        6. \App_data\jobs\continuous\AutomationEngine\App_Data\Config\sitecore\sc.Commerce.MarketingAutomation.Models.xml
      • DON’T FORGET to do IIS reset
    • Note 2: DON’T FORGET to copy / paste storefront.local.cer generated in Step 1 to \sc9_com_install
    • Note 3: you may get the error message “Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send.” so following this one to overcome it
      • Ex: add [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 to \sc9_com_install\SIF\sc9_com_install.ps1 in order to force TLS1.2
  8. xcw_5.jpeg

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

Advertisement

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 )

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.