Installing Sitecore 10.1 with SCORE


Prerequisites

I recommend you create a folder called Sitecore 10.1 and download everything you need from this list below into that folder before beginning this process. Please be aware that if you already have Sitecore 10 installed that you might not need some of the items below so just skip them if that is the case.

ItemsHow to get them

Windows 10 or greater

(All versions but Enterprise)

Windows 10 or greater will be needed to install all items needed for Sitecore 10.1

Sitecore 10.1.0 rev. 005207 (WDP XP0 packages)

Powershell 7.1.3

Release v7.1.3 Release of PowerShell · PowerShell/PowerShell · GitHub

Powershell Extensions 6.0Installation - Sitecore PowerShell Extensions

NSSM 2.24

https://nssm.cc/release/nssm-2.24.zip
Sitecore TDS (download the latest version, you might have to scroll down the page to see the download link)https://www.teamdevelopmentforsitecore.com/Download/TDS-Classic

Microsoft Visual C++ 2015 Redistributable

https://www.microsoft.com/en-us/download/details.aspx?id=53587
Visual Studio 2019 Professional

Please check that this is already installed on your computer.    If not you might have to talk to your manager about how to get a license to install it.   Other versions of VS 2019 should work as well but I didn't have any other version to test it out so I can't say that you won't run into any issues.

SQL Server 2019  or SQL Server 2017

(Standard Edition)

Please check that this is already installed on your computer.    If not you might have to talk to your manager about how to get a license to install it.   


To determine what version you have you can open SQL Server Management Studio and run this query

SELECT @@VERSION

If should return something like this below

Microsoft SQL Server 2017 (RTM-GDR) (KB4583456) - 14.0.2037.2 (X64) Nov 2 2020 19:19:59 Copyright (C) 2017 Microsoft Corporation Express Edition (64-bit) on Windows 10 Enterprise 10.0 <X64> (Build 19041: ) (Hypervisor)

Microsoft SQL Server Data-Tier Application Framework (DacFx)

Download Microsoft® SQL Server® Data-Tier Application Framework (18.3.1) from Official Microsoft Download Center

SQL Server System CLR Types

Download Microsoft SQLSysCLRTypes from Official Microsoft Download Center

Microsoft .Net Framework 4.8.0

If you would like to know what version of .Net you have installed you can go to this page to figure it out
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed

Download .NET Framework 4.8 | Free official downloads (microsoft.com)


Web Platform Installer 5.0

  • Web Deploy 3.6 for Hosting Servers (Use Web Platform Installer to install)
  • URL Rewrite 2.1 (Use Web Platform Installer to install)
https://www.microsoft.com/web/downloads/platform.aspx#additionalDownloads

Solr 8.4.0

(You can check the SOLR compatibility of each Sitecore instance here: https://kb.sitecore.net/articles/227897)

Solr 8.4.0 downloads

JRE (Java Runtime Environment) 

(This might not be needed if you have installed Solr before)

Java SE Runtime Environment 8 - Downloads (oracle.com)
SCORE Visual Studio Solution Template

SCORE Visual Studio Solution Scaffolding v3.5.8

SCORE Tenant ScaffoldingSCORE 3.1.1.0 Tenant Scaffolding Automation

Install Prerequisites

  1. Visual Studio 2019

    • You might already have Visual Studio 2017 but Sitecore 10.1 recommends you use Visual Studio 2019.   Please install Visual Studio 2019 if you don't already have it installed
    • If you have VS 2017 or earlier you do NOT need to remove them in order to install Visual Studio 2019.
  2. Sitecore TDS 6.0

    • In case there is a newer version you should probably use that.
  3. Powershell 5.1 and 7.1.3+

    • To check your powershell version open a DOS command window as an Administrator and type `powershell $PSVersionTable.PSVersion` and make sure it says version '5.1'
    • Install Powershell 7.1.3
  4. Microsoft .Net Framework 4.8.0

  5. Microsoft Web Platform Installer 5.0

    • Install Web Platform Installer 5.0 from the list above
    • Open IIS > Actions > Get New Web Platform Components

  • Do a search for the following items and then click the button "Add" and then "Install"
    • URL Rewrite 2.1
    • Web Deploy 3.6 for Hosting Servers
    • Microsoft® SQL Server® Data-Tier Application Framework (18.3.1 DacFx) if you can not find it over the Web Platform then install it from the Prerequisites list above

Sass (Dart)

  • Dart

    • Go here dart-sass and download dart-sass which is suitable for your operating system
    • Extract it where you want.
    • Open windows search and search this "system environment variables" then click it to open.
    • enter image description here
    • Click "Environment Variables" 
    • enter image description here
    • Under system variables find the PATH variable, select it, and click "Edit"
    • enter image description here
    • If there is no PATH variable, click "New" and write here PATH. 
    • enter image description here
    • enter image description here
    • Go to your dart-sass folder and copy directory (Yours will probably be different from mine below). Make sure none of your intermediary folders is a .zip folder, you may run into problems.
    • enter image description here
    • Add your directory to the beginning of the variable value followed by ; (a semicolon). For example, if the value was C:\Windows\dart-sass, change it to C:\Users\Me\bin;C:\Windows\dart-sass. If there is not another directory just add your directory here. Then click "Ok". 
    • enter image description here
    • Open "Command Prompt".
    • enter image description here
    • Write here "sass --version" and click enter to be sure it installed correctly and then you should be done
    • enter image description here

Create MySite folder with VS Scaffold

  • Create a folder C:\Projects and then under that add a folder called MySite so you should now have path called C:\Projects\MySite ( You can do it differently as long as you understand what you are doing)
  • Extract SCORE+Visual+Studio+Solution+Scaffold+v3.5.8.zip (this should have been downloaded from your prerequisites and it was called SCORE Visual Studio Solution Template) into MySite
  • It should look something like the screenshot below once it is extracted

  • Copy your Sitecore license (license.xml) file to C:\Projects\MySite  (You will have to get this from your company so please talk to your manager about how to get this license)
  • Copy 'Sitecore 10.1.0 rev. 005207 (WDP XP0 packages)' to C:\Projects\MySite (This is the first item that you would have downloaded from our prerequisite list above)

Install SQL Server 2019

  • Install SQL Server 2019

  • Install Microsoft Visual C++ 2015 Redistributable

  • Install SQL Server System CLR Types from the Prerequisites list above

Install Webpack

Run command (CMD): 'npm install -g webpack' (use -g to install it globally). Make sure you have Node js. installed on your computer and your run the command prompt as an administrator. You can download Node js. from the following link: https://nodejs.org/en/download/

Install Solr 8.4.0

  • Download JRE from the Prerequisites list above (this might not be needed if you already have Solr installed)
    • Install JRE
    • Add a system environment variable called JAVA_HOME that points to your java installation:
      • Variable Name: JAVA_HOME
      • Variable Value (set as necessary): C:\Program Files (x86)\Java\jre1.8.0_77 (Your version of jre will most likely be different so don't just copy the value but adjust it based on the version of jre you've installed)
  • Download Solr 8.4.0 from the Prerequisites list above
  • Create a folder called C:\solr-8.4.0
  • Unzip the Solr zip file and place it in C:\solr-8.4.0
    • Hint: Remove any intermediary folders to avoid a folder structure like C:\solr-8.4.0\solr-8.4.0\server
    • It should now be a valid path on your file system: C:\solr-8.4.0\server
  • Download NSSM from the Prerequisites list above
    • Unzip it into C:\nssm
    • Open a DOS Window with Administrator rights
    • Type "powershell" (without double quotes)
    • cd C:\nssm\win64
    • ./nssm install "Solr - MySite"
    • The NSSM Service Installer application window will open. Set the following values:
      • Path: C:\solr-8.4.0\bin\solr.cmd
        Startup Directory: C:\solr-8.4.0\bin
        Arguments: start -f -p 8983   (If you already have Solr installed then you might want to change 8983 to a different port number else you will run into issues, I used 8999 and it worked for me but you might have to use something else if that port is already used)
        Display Name (under Details tab): SOLR - MySite
        Description (under Details tab): C:\solr-8.4.0\bin\solr.cmd start -f -p 8983
        Startup type: Automatic
      • Open your services and start the newly created "Solr - MySite" service
  • Verify that you can see the SOLR Dashboard at http://localhost:8983/solr/#/
  • Troubleshooting
    • Reboot your computer and then verify that you can see SOLR Dashboard at http://localhost:8983/solr/#/
    • If you can't see it then make sure your Startup Type in Services for "Solr - MySite" is set to Automatic
    • Also make sure that if you have another Solr instance installed that is using the same port (8983) that you stop that service and set it to Manual in Services
    • Double check about the port you decided to use and if it is different from 8983 then use that number in the url instead

SOLR SSL Setup

  • Open a DOS window in Admin mode
  • cd C:\Projects\MySite
  • Enter this command:  "C:\Program Files\Java\jre1.8.0_301\bin\keytool.exe" -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass secret -storepass secret -validity 9999 -keystore solr-ssl.keystore.jks -ext SAN=DNS:localhost,IP:127.0.0.1 -dname "CN=localhost, OU=Organizational Unit, O=Organization, L=Location, ST=State, C=Country" 
    (Make sure you put in the proper jre in the file path, my version may be different than yours)
  • After you've ran the previous command enter this command: "C:\Program Files\Java\jre1.8.0_301\bin\keytool.exe" -importkeystore -srckeystore solr-ssl.keystore.jks -destkeystore solr-ssl.keystore.p12 -srcstoretype jks -deststoretype pkcs12 -srcstorepass secret -deststorepass secret
    (Also be aware of the jre version)
  • Once that runs it will create 2 files under C:\Projects\MySite then copy them to C:\solr-8.4.0\server\etc
    • solr-ssl.keystore.jks
    • solr-ssl.keystore.p12
  • Open C:\solr-8.4.0\bin\solr.in.cmd and add the lines below to it


set SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.jks
set SOLR_SSL_KEY_STORE_PASSWORD=secret
set SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.jks
set SOLR_SSL_TRUST_STORE_PASSWORD=secret
  • Make sure that the certificate solr-ssl.keystore.p12 is added to the trusted root certificates  (this may not be needed but if you run into issues then double check)
    • Install certificate by double clicking on the generated solr-ssl.keystore.p12 file and follow the wizard to import the certificate. When you reach the Certificate Store window, make sure to place the certificate in the Trusted Root Certification Authorities.

    • If you are prompted for a password, the password is "secret", as previously set in the script.
  • Restart "Solr - MySite" window service
  • If it works then you should be able to go to https://localhost:8983/solr/#/ but it also means that http://localhost:8983/solr/#/ will no longer work. (HTTPS is what has been added)
    • If https://localhost:8983/solr/#/ doesn't work then make sure to double check that you didn't change the port number and if you did then change 8983 to the port number you used instead

Install SIF 

  • Open Windows PowerShell (run as administrator)
  • Use the following Powershell commands to install the latest version of SIF

    Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
    Install-Module SitecoreInstallFramework -RequiredVersion 2.1
    Install-Module SitecoreFundamentals -RequiredVersion 1.1
    Update-Module SitecoreInstallFramework
    Update-Module SitecoreFundamentals
    Import-Module SitecoreFundamentals -Force
    Import-Module SitecoreInstallFramework -Force

    After running the commands below make sure the modules are under C:\Program Files\WindowsPowerShell\Modules and you should see 2 folders

    • SitecoreFundamentals
    • SitecoreInstallFramework


Enable Contained Database Authentication

Open Sql Server Management Studio

Open a new query window and run this script -

EXEC sp_configure 'contained database authentication', 1;
GO


RECONFIGURE;
GO


Install Sitecore 10.1

  • Double check that you have placed your Sitecore License under C:\Projects\MySite
  • Double check that you have placed the package `Sitecore 10.1.0 rev. 005207 (WDP XP0 packages)` under C:\Projects\MySite
  • Double check that the install.ps1 script exists under C:\Projects\MySite\Automation\Sitecore-Versions\10.1\
  • Open Windows Powershell as Administrator
  • Type "cd C:\Projects\MySite" (without the double quotes)
  • Run the powershell script below
    • This is a sample script so please change the variables values that fit your instance
.\Automation\Sitecore-Versions\10.1\install.ps1 -xp0package "Sitecore 10.1.0 rev. 005207 (WDP XP0 packages).zip" -site "mysite" -solrUrl "https://localhost:8983/solr" -solrRoot "C:\solr-8.4.0\" -solrService "SOLR - MySite" -sqlServer "<Your SQL Server Instance Name>" -sqlAdminUser "sa" -sqlAdminPassword "<Your Password>" -SitePhysicalRoot ".\sandbox\" -license ".\license.xml"
  • This can take a while to run so please be patient (smile) (It took around 12 mins on my computer to finish installing in sandbox)
  • Once it is done and you didn't run into any errors then check that you can log into Sitecore (https://mysite/sitecore)
  • If you didn't change anything, the default Username is "admin" and password "b".

Rename the Visual Studio Solution

Open a DOS window in Admin mode and then do the following

    • cd C:\Projects\MySite
    • run the cmd "powershell -f scaffold.ps1"
    • solution: MySolution.MySite
    • tenant: MySite
    • company: My Company (you can change this to your company name if you want)
    • site name: mysite

It should look something like this below but you might or might not get the security warning

DART SASS

If you used DART SASS instead of Ruby SASS then you will need to change your MySolution.MySite.Web CSPROJ file so that it will contain the following compiler options for SASS.

Just right click on the MySolution.MySite.Web and click "Unload Project" then right click on the Web project again and click "Edit MySolution.MySite.Web.csproj".   In the opened project file you will need to 

scroll down to the "CompileSass" area and change it to the one below.    Save the changes and then right click on the project again and click "Reload Project"


<Target Name="CompileSass" AfterTargets="Build">
    <Exec Command="sass Areas\MySite\scss\main.scss Areas\MySite\css\main.css" IgnoreExitCode="false" />
    <Exec Command="sass Areas\MySite\scss\page_editor.scss Areas\MySite\css\page_editor.css" IgnoreExitCode="false" />
</Target>


Install Powershell Extensions

  • One of the items to download from the list above was Powershell Extensions 6.0 so please download it if you haven't already
  • Log into Sitecore https://mysite/sitecore
  • Click the "Desktop" icon
  • Click the Sitecore icon button > Development Tools > Installation Wizard
  • Find the Powershell Extensions package you downloaded and install it
  • Once done it will show a Close button and will ask to restart the client, click Close and you will be done

Install SCORE

  • Open Visual Studio 2019 and open the solution under C:\Projects\MySite
  • Set your build profile to Sandbox
  • The Nuget Package Manager Console should start installing SCORE and other packages for you and if it doesn't then close VS 2019 and reopen the solution again or go to 


Select the following SCORE Nuget packages only and install them in the order selected

  • SCORE.10.1.0
  • SCORE.UI.10.1.0
  • SCORE.BootstrapUI.10.1.0

Don't install the NuGet packages showing Core or PROD in the name

  • Add Score via nuget (current and most recent for Sitecore version 10.1.0 - select SCORE nuget source)
    - SCORE to: MySolution.MySite.Custom, MySolution.MySite.Data and MySolution.MySite.Web 
    - SCORE UI to: MySolution.MySite.Custom, MySolution.MySite.Data and MySolution.MySite.Web 
    - SCORE BOOTSTRAP UI to: MySolution.MySite.Custom, MySolution.MySite.Data and MySolution.MySite.Web
  • Make sure you run Internet Explorer and complete initial wizard
  • Even when you have Score checked as installed nuget package, you should open your package manager console and type "y" if you are prompted like in the image down below:
  • Add the score.license to the following area (C:\Projects\MySite\sandbox\mysite\App_Data) and then restart IIS
  • Go to https://mysite/score/about/version and make sure your license is valid. 
  •  
  • If your installation fails using NuGet then you might need to install it manually (Would be best to talk to the instructor for your training if that is the case to help you install it manually)

Create MySite Tenant in Sitecore

  • Install the package SCORE+Bootstrap+3+Tenant+Scaffolding+Automation-3.1.1.0.zip that was downloaded from the prerequisites above called SCORE Tenant Scaffolding.
  • Log into Sitecore → Click Desktop (From Launch Area) → Click the Sitecore logo → Development Tools → Installation Wizard
  • Find the package to install it using the Installation Wizard
  • Right click on the ribbon to show the Developer tab 
  • Click on the "New Site" button to create the tenant and enter "MySite" and then click "Proceed"
  • After you click Proceed it should run it and then look like this below and then you are done with adding the tenant to Sitecore

Add MySite Tenant Cores to Solr

SCORE needs 2 indexes that have to be added to Solr

  • mysite_tenant_master_index
  • mysite_tenant_web_index

The config files were added to the solution and are set by default to disabled so remove the .disabled part in the name

  • C:\Projects\MySite\sandbox\mysite\App_Config\Include\MySolution.MySite\ContentSearch.Solr.Index.Master.config.disabled rename to C:\Projects\MySite\sandbox\mysite\App_Config\Include\MySolution.MySite\ContentSearch.Solr.Index.Master.config
  • C:\Projects\MySite\sandbox\mysite\App_Config\Include\MySolution.MySite\ContentSearch.Solr.Index.Web.config.disabled rename to C:\Projects\MySite\sandbox\mysite\App_Config\Include\MySolution.MySite\ContentSearch.Solr.Index.Web.config
  • C:\Projects\MySite\sandbox\mysite\App_Config\Include\MySolution.MySite\ContentSearch.Solr.IndexConfiguration.config.disabled to C:\Projects\MySite\sandbox\mysite\App_Config\Include\MySolution.MySite\ContentSearch.Solr.IndexConfiguration.config

Solr doesn't know they exist so you have to add them as a core manually

You should create the following folders for 'mysite_tenant_master_index'

  • C:\solr-8.4.0\server\solr\mysite_tenant_master_index
  • C:\solr-8.4.0\server\solr\mysite_tenant_master_index\data
  • Copy everything under C:\solr-8.4.0\server\solr\configsets\_default and place it under C:\solr8.4.0\server\solr\mysite_tenant_master_index

Do the same for 'mysite_tenant_web_index' and you should have the following

  • C:\solr-8.4.0\server\solr\mysite_tenant_web_index
  • C:\solr-8.4.0\server\solr\mysite_tenant_web_index\data
  • Copy everything under C:\solr-8.4.0\server\solr\configsets\_default and place it under C:\solr-8.4.0\server\solr\mysite_tenant_web_index

Once that is done then do the following

  • Open Solr (https://localhost:8983/solr/#/) (Again the port number might be different for you)
  • Click on "Core Admin" on the left hand bar
  • Click on the button "Add Core"
    • Fill in the following parameters for mysite_tenant_master_index
      • name: mysite_tenant_master_index
      • instanceDir: mysite_tenant_master_index
      • dataDir: data
      • config: solrconfig.xml
      • schema: schema.xml
    • Click the blue button "Add Core"
  • Click on the button "Add Core"
    • Fill in the following parameters for mysite_tenant_web_index
      • name: mysite_tenant_web_index
      • instanceDir: mysite_tenant_web_index
      • dataDir: data
      • config: solrconfig.xml
      • schema: schema.xml
    • Click the blue button "Add Core"
  • Open the file C:\solr-8.4.0\server\solr\mysite_tenant_master_index\conf\managed-schema and make the following changes
    • - change `<uniqueKey>_uniqueid</uniqueKey>`
      - add `<field name="_indexname" type="string" indexed="true" stored="true"/>`
      - add `<field name="_uniqueid" type="string" indexed="true" required="true" stored="true"/>`
  • Open the file C:\solr-8.4.0\server\solr\mysite_tenant_web_index\conf\managed-schema and make the following changes
    • - change `<uniqueKey>_uniqueid</uniqueKey>`
      - add `<field name="_indexname" type="string" indexed="true" stored="true"/>`
      - add `<field name="_uniqueid" type="string" indexed="true" required="true" stored="true"/>`
  • Go to services in Windows and stop and start your Solr service "Solr - MySite"
  • Login to sitecore. Open Control Panel → Populate Solr Managed Schema → Select all → Populate. ( You should see mysite_tenant_master_index and mysite_tenant_web_index in the list to populate but if you don't make sure the solr config files are not disabled for both config files)
  • After this completes, Click on Indexing manager and rebuild all indexes. Confirm that your newly created indexes are displaying in the Index list

Build your solution

Using the Sandbox build configuration, build your solution.


Congratulations you have now set up MySite with Sitecore 10.1 and SCORE 3