SItecore 9.0 update 2 Installation using SIF

 

I have written a blog on how to install sitecore version 9.0 using SIF in my blog https://horizontalintegration.blog/2018/03/06/sitecore-9-0-installation-with-sif/.

This blog explains the steps and experiences and errors I encountered in the installation of Sitecore 9.0 update 2.In this blog I am highlighting the changes or modifications that needs to be done apart from the installation of Sitecore 9.0.With Sitecore 9.0 installations, we get enhanced advantages of some core functionalities like Sitecore xConnect which allows two-way data connect, data exchange framework 2.0 enhanced SQL providers, native integration with Azure services.

Let’s discuss the prerequisites and installation steps.

Prerequisites

  1. IIS 10 or IIS 8.5
  2. Windows 8.1 or Windows 10
  3. .NET framework 4.6.2
  4. Sitecore Installation Framework
  5. PowerShell 5.1 or later
  6. Web Platform Installer 5.0
  7. Microsoft SQL server 2016
  8. Java Runtime environment
  9. Solr 6.6.2 – this is requirement for update 2
  10. MongoDB server 3.6.6

 Initial Steps

Install Java runtime for Windows by using http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Install Solr 6.6.2(solr-6.6.2.zip) from the following URL

http://archive.apache.org/dist/lucene/solr/6.6.2/

Extract the zip file into program files

Navigate to the solr installation folder using command – cd C:\Program Files\solr-6.6.2\bin

Run command solr start.

Solr will start on port 8983.Make sure url http://localhost:8983/solr/#  running.

    

 

Add SSL to Solr

We need to generate the ssl key by using java keyttol.exe which is in location ‘C:\Program Files\solr-6.6.2\server\etc’

For doing this,Follow procedure below

  • From command prompt -navigate to solr folder with command “cd C:\Program Files\solr-6.6.2\server\etc”
  • Run “C:\Program Files\Java\jdk1.8.0_144\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”

           Note – C:\Program Files\Java\jdk1.8.0_144\bin is java JRE installation folder.

  • solr-ssl.keystore.jks file will be ghenerated at C:\Program Files\solr-6.6.2\server\etc folder.
  • Run “C:\Program Files\Java\jdk1.8.0_144\bin\keytool.exe” -importkeystore -srckeystore solr-ssl.keystore.jks -destkeystore solr-ssl.keystore.p12 -srcstoretype jks -deststoretype pkcs12

          Note – enter ‘secret’ as password

  • Key solr-ssl.keystore.p12 will be generated.See the screnshot

  • Double click on the key to open certificate Import wizard and install certificate.
  • While installing certificate , select Certificate Store: Trusted Root Certification Authorities
  • Navigate to ‘C:\Program Files\solr-6.6.2\bin\solr.in.cmd’ and uncomment following lines(remove REM).

           set SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.jks

            set SOLR_SSL_KEY_STORE_PASSWORD=secret

            set SOLR_SSL_KEY_STORE_TYPE=JKS

           set SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.jks

          set SOLR_SSL_TRUST_STORE_PASSWORD=secret

          set SOLR_SSL_TRUST_STORE_TYPE=JKS

           set SOLR_SSL_NEED_CLIENT_AUTH=false

          set SOLR_SSL_WANT_CLIENT_AUTH=false

  • Restart solr using solr restart -p 8983 from C:\Program Files\solr-6.6.2\bin path
  • Make sure url https://localhost:8983/solr/# is accessable and running.

Follow steps below to make Solr as service follow the steps below

  1. Install NSSM from https://nssm.cc/download
  2. Navigate to NSSM installed folder(for example C:\Program Files\nssm\nssm-2.24\nssm-2.24\win64) using command prompt and run nssm install solr6
  3. Populate the fields shown on service editor like shown in screenshot below.Make sure to add arguments ‘start -f -p 8983’ and install service

 

Sitecore Installation

 Enable Contained Database Authentication

Before installing Sitecore 9.2, ensure that SQL server is configured to allow the users and logins to be contained in the database level.For doing so run the following script in SQL server

                   sp_configure ‘contained database authentication’, 1;

                  GO

                  RECONFIGURE;

                 GO

Start Installation

  1. Download the Packages for XP Single from https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/90/Sitecore_Experience_Platform_90_Update2.aspx (update 2) and extract it to C:\sitecore9.02update
  2. Extract the Sitecore 9.0.2 rev. 180604 (WDP XP0 packages) to see the following zip folders
  • Sitecore 9.0.2 rev. 180604 (OnPrem)_single.scwdp.zip
  • Sitecore 9.0.2 rev. 180604 (OnPrem)_xp0xconnect.scwdp.zip
  • XP0 Configuration files 9.0.2 rev. 180604.zip

Now, Copy the first 2 zip files on to C:\sitecore9.02update folder and extract the third zip file (XP0 Configuration files 9.0.2 rev. 180604.zip) into C:\sitecore9.02update folder.

  1. Save license file to the folder c:\sitecore9.02update folder
  2. Save the following PowerShell script into installsitecore900.ps1.Red highlighted fields needs to be modified according the installed server needs. The following script is specifically for installing Sitecore 9.0 update 2.In the following script, modify the lines highlighted below.

Note – make sure to have lower case letters  in the $prefix = “websitename” in the powershell script because this prefix name is used by solr to create cores and it will create cores with upper letters which is not acceptable in solr.

Import-Module SitecoreFundamentals

Import-Module SitecoreInstallFramework

#define parameters

$prefix = "websitename"

$PSScriptRoot = "C:\sitecore9.02update"

$XConnectCollectionService = "$prefix.xconnect"

$sitecoreSiteName = "local.$prefix"

$SolrUrl = "https://localhost:8983/solr"

$SolrRoot = "C:\solr-6.6.2\solr-6.6.2"

$SolrService = "solr"

$SqlServer = "JN6P8H2"

$SqlAdminUser = "sitecore"

$SqlAdminPassword="sitecore"

#install client certificate for xconnect

$certParams = @{

    Path = "$PSScriptRoot\xconnect-createcert.json"

    CertificateName = "$prefix.xconnect_client"

}

Install-SitecoreConfiguration @certParams -Verbose

 

#install solr cores for xdb

$solrParams = @{

    Path = "$PSScriptRoot\xconnect-solr.json"

    SolrUrl = $SolrUrl

    SolrRoot = $SolrRoot

    SolrService = $SolrService

    CorePrefix = $prefix

}

Install-SitecoreConfiguration @solrParams

 

#deploy xconnect instance

$xconnectParams = @{

    Path = "$PSScriptRoot\xconnect-xp0.json"

    Package = "Sitecore 9.0.2 rev. 180604 (OnPrem)_xp0xconnect.scwdp.zip"

    LicenseFile = "$PSScriptRoot\license.xml"

    Sitename = $XConnectCollectionService

    XConnectCert = $certParams.CertificateName

    SqlDbPrefix = $prefix

    SqlServer = $SqlServer

    SqlAdminUser = $SqlAdminUser

    SqlAdminPassword = $SqlAdminPassword

    SolrCorePrefix = $prefix

    SolrURL = $SolrUrl

 

}

Install-SitecoreConfiguration @xconnectParams

 

#install solr cores for sitecore

$solrParams = @{

    Path = "$PSScriptRoot\sitecore-solr.json"

    SolrUrl = $SolrUrl

    SolrRoot = $SolrRoot

    SolrService = $SolrService

    CorePrefix = $prefix

}

Install-SitecoreConfiguration @solrParams

 

#install sitecore instance

#$xconnectHostName = "$prefix.xconnect"

$sitecoreParams = @{

    Path = "$PSScriptRoot\sitecore-XP0.json"

    Package = "$PSScriptRoot\Sitecore 9.0.2 rev. 180604 (OnPrem)_single.scwdp.zip"

    LicenseFile = "$PSScriptRoot\license.xml"

    SqlDbPrefix = $prefix

    SqlServer = $SqlServer

    SqlAdminUser = $SqlAdminUser

    SqlAdminPassword = $SqlAdminPassword

    SolrCorePrefix = $prefix

    SolrUrl = $SolrUrl

    XConnectCert = $certParams.CertificateName

    Sitename = $sitecoreSiteName

    XConnectCollectionService = "https://$XConnectCollectionService"

}

Install-SitecoreConfiguration @sitecoreParams
  1. The directory should look like the screenshot below

 

  1. Now, Open powershell command from C:\sitecore9.02updateand run the below script

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

  1. Run the command

      Install-Module SitecoreInstallFramework

  1. Now, Run following command

       Install-Module SitecoreFundamentals

  1. Now, Run ps1 script from folder c:\Sitecore\9.0

 

https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/90/Sitecore_Experience_Platform_90_Update2.aspx

https://blogs.perficient.com/sitecore/2017/10/26/setup-and-basic-preparation-for-sitecore-9-installation/

https://theagilecoder.wordpress.com/2017/07/24/sitecore-solr-ssl/

https://www.sitecorespark.com/blog/2017/11/sitecore-installation-framework-error-processing-pools