top of page
Amit More

Install Sitecore 10.2 on Windows 10 developer machine using Sitecore Installation Framework(SIF)

If you are interested in setting up the Sitecore 10.2 version on your local machine then stay tuned, read the entire blog and follow the steps mentioned.


Sitecore has provided the following guideline document to install Sitecore 10.2 on-premise environment :


Below are some of the prerequisites which should be covered before we start with the installation:

Decide the topology


Before we start with the installation, we need to finalize one of the topologies from the below option:

  • XP Single Developer (XP0)

  • XM Scaled (XM1)

  • XP Scaled (XP1)

Since we are going to install the Sitecore on our local development machine, moving ahead with XP Single Developer(XP0) makes more sense.


Download Sitecore 10.2 XP Single Developer package


Once the topology is selected, download the specific Sitecore 10.2 installation package Packages for XP Single from the following link: https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/102/Sitecore_Experience_Platform_102.aspx.


Using this package below 3 instances will be installed as part of the Sitecore Experience Platform:

  1. Sitecore(with Experience Database (xDB))

  2. xConnect(Experience Database (xDB))

  3. Sitecore Identity server

Verify the Windows PowerShell version


Use command $PSVersionTable to verify the PS version. It should be 5.1 or later for this installation


Setup the PowerShell command-let to the unrestricted mode


Command: Set-ExecutionPolicy unrestricted

Select Yes to all in the above prompt to make the PS session unrestricted.


Register PowerShell repository for Sitecore Gallary


Command: Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2


Install SIF


Command:

  • Install SIF: Install-Module SitecoreInstallFramework

  • Check the SIF version: Get-Module SitecoreInstallFramework –ListAvailable


Download and install the .Net Core 3.1 version


.Net Core 3.1 can be downloaded from https://dotnet.microsoft.com/en-us/download/dotnet/3.1



Install Microsoft SQL Server 2019 Developer edition



Make sure to note the server name and SA or admin credentials you will set up while SQL Server installation



Install JAVA


Install Java by downloading it from


Once Java is installed we need to set up the JAVA_HOME variable to the appropriate path. To do that right-click on This PC



  • Variable: JAVA_HOME

  • Value: C:\Progra~2\Java\jre1.8.0_251

Please refer to the following link to set up the environment variable correctly:


Install Solr


Install the Solr based on the compatibility table: https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0227897


In my case, I have installed Solr 8.11.2 and downloaded the .zip installation package from https://solr.apache.org/downloads.html, Direct Link: https://www.apache.org/dyn/closer.lua/lucene/solr/8.11.2/solr-8.11.2.zip?action=download


To install Solr extract the .zip package to the separate folder, in my case it was Sitecore at the C drive root location:



Install SSL Certificate for Solr


You need to execute the following command to generate the SSL certificate for Solr: Install-SitecoreConfiguration -Path .\Prerequisites.json

.\XP0-SingleDeveloper.ps1

New-SelfSignedCertificate -CertStoreLocation cert:\LocalMachine\My -DnsName "localhost", "127.0.0.1" -FriendlyName "SolrCert" -NotAfter (Get-Date).AddYears(10)


You can find the certificate in the Manage Computer Certificate panel as above. Once the certificate is generated we need to export it to use for our Solr installation.


Export the certificate by setting the password to encrypt it


Copy the Solr Cert to the Solr 8.11.2 root directory.


Locate C:\Sitecore\solr-8.11.2\bin\solr.in.cmd and then uncomment following highlighted

lines by removing REM from the start of the setting


REM Enables HTTPS. It is implictly true if you set SOLR_SSL_KEY_STORE. Use this config

REM to enable https module with custom jetty configuration.

REM set SOLR_SSL_ENABLED=true

REM Uncomment to set SSL-related system properties

REM Be sure to update the paths to the correct keystore for your environment

set SOLR_SSL_KEY_STORE=C:/Sitecore/solr-8.11.2/solrcert.pfx

set SOLR_SSL_KEY_STORE_PASSWORD=[Your Cert Password]

set SOLR_SSL_TRUST_STORE=C:/Sitecore/solr-8.11.2/solrcert.pfx

set SOLR_SSL_TRUST_STORE_PASSWORD=[Your Cert Password]

REM Require clients to authenticate

set SOLR_SSL_NEED_CLIENT_AUTH=false

REM Enable clients to authenticate (but not require)

set SOLR_SSL_WANT_CLIENT_AUTH=false

REM Verify client hostname during SSL handshake

REM set SOLR_SSL_CLIENT_HOSTNAME_VERIFICATION=false

REM SSL Certificates contain host/ip "peer name" information that is validated by default. Setting

REM this to false can be useful to disable these checks when re-using a certificate on many hosts

REM set SOLR_SSL_CHECK_PEER_NAME=true

REM Override Key/Trust Store types if necessary

set SOLR_SSL_KEY_STORE_TYPE=PKCS12

set SOLR_SSL_TRUST_STORE_TYPE=PKCS12


After the above step, we are all set to start the Solr instance by executing solr.cmd start command in new PowerShell session (solr.cmd is located at C:\Sitecore\solr-8.11.2\bin)

By default, Solr will be hosted on the 8983 port. Once the Solr instance is started we can check if the Solr instance is up and running by running it inside the browser: https://localhost:8983/solr/#/



Install Sitecore 10.2


Export XP0 Configuration files 10.2.0 rev. 006766


XP0 Configuration files 10.2.0 rev. 006766 is one of 4 zip included in the Sitecore installation package


The export content needs to be copied and organized to a separate install directory to locate from PowerShell for its installation


Once copied we need to run the Install Sitecore configuration command:

Install-SitecoreConfiguration -Path .\Prerequisites.json .\XP0-SingleDeveloper.ps1

Copy Sitecore, xConnect, and Identity Server packages from the Sitecore installation extract to the install directory:


Open XP0-SingleDeveloper PowerShell script and update the relevant configuration as below:

Make sure that the proper Sitecore license copy is there in the installation folder before running the installation script


Once the changes are done to this command file, we can execute this script by running the Run Script(F5) button from the PowerShell window.


It will take some time to install the Sitecore. If everything goes good you will able to see 3 new instances hosted on your local IIS like below

You can then check if the Sitecore default page and the Sitecore authentication is working with below URLs:




Make sure to note the Sitecore Experice Platform login automated password thrown after the Sitecore PowerShell installation is completed. This will be used to login to Sitecore, which can be changed later on.


Issues Faced


For me it was not straightforward. At the time of installation I encountered couple of issues and exceptions. Below is the error trace from the PowerShell console:


msdeploy.exe : Error Code: ERROR_EXECUTING_METHOD

At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.3.0\Public\Tasks\Invoke-CommandTask.ps1:31 char:13

+ & $Path $Arguments | Out-Default

+ ~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (Error Code: ERROR_EXECUTING_METHOD:String) [], RemoteException

+ FullyQualifiedErrorId : NativeCommandError

More Information: Could not deploy package.

Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql140DatabaseSchemaProvider is not valid.

You must make sure the service is loaded, or you must provide the full type name of a valid database platform service.

Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql140DatabaseSchemaProvider is not valid.

You must make sure the service is loaded, or you must provide the full type name of a valid database platform service.

Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.

Error: Could not deploy package.

Error: Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql140DatabaseSchemaProvider is not

valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service.

Error: Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql140DatabaseSchemaProvider is not

valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service.

Error count: 1.

Install-SitecoreConfiguration : Command C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a non-zero exit code -

(-1)

At C:\Sitecore\install\XP0-SingleDeveloper.ps1:82 char:1

+ Install-SitecoreConfiguration @singleDeveloperParams *>&1 | Tee-Objec ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:02:53

Invoke-CommandTask : Command C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a non-zero exit code - (-1)

At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.3.0\Public\Tasks\Invoke-WebDeployTask.ps1:36 char:2

+ Invoke-CommandTask -Path $Path -Arguments $msdeployArgs -TaskName ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-CommandTask

Fix


To fix this issue I had to update the registery. I had to update below entries under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3 path:


  1. DacFxDependenciesPath: C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin

  2. DacFxPath: C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin

You can refer following article to know more about this fix: https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0019579


Also make sure that DAC is installed along with SQL Server if not it can be installed from https://docs.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver15


After making all these changes script ran beutifully for me. It took few minutes to finish the installation and I was able to access Sitecore XP and website successfully.

914 views0 comments

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page