Sitecore 9 installation and configuration nuts & bolts.

Now in Sitecore 9 version we have very good out of the PowerShell based installation/provisioning framework.

Even other than installation framework we have some more rich features, but we will not cover these features in this article.

Following are the minimum Prerequisites:

  1. Windows 8.1, 10, Server 2012 R2
  2. SQL Server 2016 or greater
  3. .Net Framework 4.6.2
  4. IIS 8.5 or 10
  5. Java Runtime Enviroment (JRE)
  6. Microsoft Powershell 5.1+
  7. Web Platform Installer 5.0
  8. Web Administration Module(IIS) Default in IIS 8.5/10
  9. Web Deploy 3.6 for Hosting Servers
  10. URL Rewrite 2+
  11. Microsoft SQL Server Data-Tier Application Framework (17.1)
  12. Microsoft SQL Server Transact-SQL ScriptDom

Step 1 : Install web deploy 3.6 for hosting servers


Open IIS manager and click on “get new web platform components” in right hand panel.

Step 2 :  Solr server installation–

Easy way to install Solr we can use the PowerShell script provided by Kamsar.

Step 3 :  Create installation folder–

To install Sitecore, we must create a folder on our local drive with all the installation files, provided by sitecore.

  • Please download the Sitecore installation files from Sitecore Dev portal –
  • Download the  Packages for XP Single (XP0) Instance configuration.
  • Copy your license file into the folder.
  • Extract the  ‘XP0 Configuration files’ and copy all the config files into the install folder


Step 4 :  Enable Contained Database Authentication by opening up SQL Server as an Administrator and executing the following script query:

sp_configure ‘contained database authentication’, 1 GO RECONFIGURE  GO

Step 5 :  Install the Sitecore Installation Framework (SIF)–

We can download from Stecore Dev portal or we can install from Sitecore nuget repository also.

We will use the following commands to install the latest version of SIF:

Register-PSRepository -Name SitecoreGallery -SourceLocation

Install-Module SitecoreInstallFramework

Update-Module SitecoreInstallFramework 

Install-Module SitecoreFundamentals.

Import-Module SitecoreFundamentals


Step 6:-Create the installation PowerShell script  using SIFLess

Download the SifLess framework from here

Run the SIFLess application as administrator.

  • Select the Licence, config.sitecore/xconnect package from the folder location create in step -3.
  • In install prefix you can add text for sitename prefix.
  • Configure the solr/database setting
  • 4
  • Click on test button and if it is successful than click on the generate files button to create the final installation power shell script file.
  • Find the installation PowerShell script in Sifless folder and run the script to install the Sitecore 9.
  • 5

Sitecore installation script generated by Sif-Less :

Import-Module SitecoreInstallFramework
$prefix = “Sitecore9”
$PSScriptRoot = “D:\Sitecore\Sitecore9\SC-9-171219\XP0 Configuration files 9.0.1 rev. 171219”
$XConnectCollectionService = “Sitecore9.xconnect”
$sitecoreSiteName = “”
$SolrUrl = “https://localhost:8983/solr”
$SolrRoot = “C:\Bitnami\solr-6.6.1-0”
$SolrService = “solrJetty”
$SqlServer = “LP-5CD6255WJW\SQLEXPRESS”
$SqlAdminUser = “sa”

#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 = “D:\Sitecore\Sitecore9\SC-9-171219\Sitecore 9.0.1 rev. 171219 (OnPrem)”
LicenseFile = “D:\Sitecore\Sitecore9\SC-9-171219\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
$sitecoreParams = @{
Path = “$PSScriptRoot\sitecore-XP0.json”
Package = “D:\Sitecore\Sitecore9\SC-9-171219\Sitecore 9.0.1 rev. 171219 (OnPrem)”
LicenseFile = “D:\Sitecore\Sitecore9\SC-9-171219\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

PowerShell version Problem

As you see that showing the PowerShell 5.1 required as per sitecore prerequisite also. In my Laptop I have Window 10 Powershell version 5.0 and to install sitecore 9 with the powershell 5.0 I have made some changes in SIF config file.


Go to this location

C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework


Open the file “SitecoreInstallFrameworkpsd1” change the powershell version value 

Problem- Solr 6.6.1 Version BaseConfig file location: In Solr 6.6.1 version baseconfig file location is “apache-solr/server/solr” location

Solution: Change this parameter in Sitecore-solr and xconnect-solr json files

Solr.Server”:      “[joinpath(variable(‘Solr.FullRoot’), ‘apache-solr’,’server’, ‘solr’)]”,



Website physical path parameter : If you want to use other than C:/inetpub/wwwroot path than change this parameter in “sitecore-XP0.json” file.

Site.PhysicalPath”: “[joinpath(environment(‘SystemDrive’), ‘inetpub’, ‘wwwroot’, parameter(‘SiteName’))]”

Problem:- After running the installation script it may be possible that we got some error like “ unable to execute becoz it is use by another process” or due to some configuration issue

To resolve this issue, we have to manually delete the given below db and stop these two web applications ( and sitecore9.xconnect) :

Note* In my Sitecore 9 installation I have repeat this steps 3 times and in fourth time its successfully installed the Sitecore 9 

USE master ; 


DROP DATABASE Sitecore9_MarketingAutomation, [Sitecre9_Processing.Pools], Sitecore9_ReferenceData, [Sitecore9_Xdb.Collection.Shard0], [Sitecore9_Xdb.Collection.Shard1], [Sitecore9_Xdb.Collection.ShardMapManager], Sitecore9_Core, Sitecore9_ExperienceForms, Sitecore9_Master, xp0_Reporting, Sitecore9_Web


Post-Installation step:

On the Start menu click Run. >>  In the Open box type cmd, and then click OK to open a Command Prompt window >>
At the command prompt, type sqlcmd. >>Than run below script.

:SETVAR DatabasePrefix sitecore9
:SETVAR UserName collectionuser
:SETVAR Password Test123
:SETVAR ShardMapManagerDatabaseNameSuffix _Xdb.Collection.ShardMapManager
:SETVAR Shard0DatabaseNameSuffix _Xdb.Collection.Shard0
:SETVAR Shard1DatabaseNameSuffix _Xdb.Collection.Shard1


IF(SUSER_ID(‘$(UserName)’) IS NULL)
CREATE LOGIN [$(UserName)] WITH PASSWORD = ‘$(Password)’; END;

USE [$(DatabasePrefix)$(ShardMapManagerDatabaseNameSuffix)]
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N’$(UserName)’) BEGIN
CREATE USER [$(UserName)] FOR LOGIN [$(UserName)]
GRANT SELECT ON SCHEMA :: __ShardManagement TO [$(UserName)] GRANT EXECUTE ON SCHEMA :: __ShardManagement TO [$(UserName)] END;

USE [$(DatabasePrefix)$(Shard0DatabaseNameSuffix)]

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N’$(UserName)’) BEGIN
CREATE USER [$(UserName)] FOR LOGIN [$(UserName)]
EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = ‘$(UserName)’ END;

USE [$(DatabasePrefix)$(Shard1DatabaseNameSuffix)]

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N’$(UserName)’) BEGIN
CREATE USER [$(UserName)] FOR LOGIN [$(UserName)]
EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = ‘$(UserName)’ END;


Finally Sitecore 9 Insatalled



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s