LibrarySites.Banner

Installing Sitecore 9: Installing the platform

The Sitecore Install Framework (SIF) uses configuration files to install Sitecore and configure the whole environment. Before you are going to install Sitecore you need to download the right files for your topology. On the download site you can find three different options.

For an on-premise installation you will be using the XP Single installation. This will install all the components on one machine.

The XP Scaled and XM Scaled are typically used for production environments where you can choose on which servers you want to install the components.

Download the XP Single package to your machine and extract the contents to a folder. I will be extracting the contents to C:\Sitecore\Installation\9.0.1\XP Single.

You should now have the following files:

  • Sitecore 9.0.1 rev. 171219 (OnPrem)_single.scwdp.zip
  • Sitecore 9.0.1 rev. 171219 (OnPrem)_xp0xconnect.scwdp.zip
  • XP0 Configuration files 9.0.1 rev. 171219.zip

Now extract the contents of the XP0 Configuration Files package in the folder itself. In the folder you should now have the following configuration (json) files

sitecore-solr.json This SIF configuration file creates the Solr indexes that are used by Sitecore.
sitecore-XP0.json This SIF configuration file sets-up the stand-alone Sitecore website on IIS and the content databases on SQL Server.

This configuration uses the Sitecore 9.0.1 rev. 171219 (OnPrem)_single.scwdp.zip WDP package

xconnect-createcert.json This SIF configuration file creates the self-signed client certificate which is passed to the xconnect-xp0.json and sitecore-XP0.json SIF configuration files.
xconnect-solr.json This SIF configuration file creates the Solr indexes that are used by xConnect.
xconnect-xp0.json This SIF configuration file sets-up the xDB and xConnect web services on IIS, the xDB databases on SQL Server, and secures them with the provided certificates.

This configuration uses the Sitecore 9.0.1 rev. 171219 (OnPrem)_xp0xconnect.scwdp.zip WDP package

Each of these SIF configuration files requires a separate set of parameters that must be passed to them during the installation process. We will have a look later on how to provide these parameters.

Finally, copy a valid license file to the folder which has all the configuration files and the WDP packages.

Now we have all the files in place to start the installation. The installation is driven by a PowerShell script. Create a new file in the folder called “install.ps1” and paste in the following script:

#define parameters

$prefix = "sc901demo"

$PSScriptRoot = "C:\Sitecore\Installation\9.0.1\XP Single"

$XConnectCollectionService = "$prefix.xconnect"

$sitecoreSiteName = "$prefix.local"

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

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

$SolrService = "solr-6.6.2"

$SqlServer = "(local)"

$SqlAdminUser = "sa"

$SqlAdminPassword="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 = "$PSScriptRoot\Sitecore 9.0.1 rev. 171219 (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

$sitecoreParams = @{

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

Package = "$PSScriptRoot\Sitecore 9.0.1 rev. 171219 (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

Once you have modified the script to fit your situation, open a PowerShell Console with administrative privileges. Go to the folder that contains the install.ps1 and run “.\install.ps1”

The installation itself will take around 7 minutes. Once completed you should be able to visit the site locally at http://sc901demo.local. Congratulations you have now installed the Sitecore Experience Platform!

As you have seen SIF plays a large role in the whole installation process. SIF has been architected to be very flexible and extendable. You can customize the whole setup process to fit your own requirements. In the next blog post we will have a look at SIF and see how you can leverage SIF and to add your own tasks.

  • I have license for CMS only. Do you have a script that allows me to install Sitecore 9 as XM instead of XP on local environment?

  • Update to my previous comment: I think I got it working. I wrote a quick post here how to get local development enviroment without xDB. www.jpkeisala.com/.../

  • getting error :-

    [-------------------------------------------------------------------- StartWebsite : ManageWebsite -------------------------------------------------------------------]

    [StartWebsite]:[Start] sc901demo.xconnect

    [-------------------------------------------------------- ConfigureSolrSchemas [1] : ManageSolrSchema ----------------------------------------------------------------]

    [ConfigureSolrSchemas [1]]:[Requesting] https://localhost:8983/solr

    [ConfigureSolrSchemas [1]]:[Schema] Modifying Schema on https://localhost:8983/solr : sc901demo_xdb

    **********************

    Command start time: 20180519154411

    **********************

    PS>TerminatingError(Invoke-RestMethod): "{

     "responseHeader":{

       "status":400,

       "QTime":691},

     "error":{

       "metadata":[

         " {

             "name":"*_l",

             "type":"long",

             "stored":false,

             "indexed":true},

           "errorMessages":["No such field type 'long'"]},

         {

           "replace-dynamic-field":{

             "name":"*_d",

             "type":"double",

             "stored":false,

             "indexed":true},

           "errorMessages":["No such field type 'double'"]},

         {

           "replace-dynamic-field":{

             "name":"*_dt",

             "type":"date",

             "stored":false,

             "indexed":true},

           "errorMessages":["No such field type 'date'"]},

         {

           "replace-dynamic-field":{

             "name":"*_ls",

             "type":"long",

             "multiValued":"true",

             "stored":false,

             "indexed":true},

           "errorMessages":["No such field type 'long'"]},

         {

           "replace-dynamic-field":{

             "name":"*_ds",

             "type":"double",

             "multiValued":"true",

             "stored":false,

             "indexed":true},

           "errorMessages":["No such field type 'double'"]},

         {

           "replace-dynamic-field":{

             "name":"*_dts",

             "type":"date",

             "multiValued":"true",

             "stored":false,

             "indexed":true},

           "errorMessages":["No such field type 'date'"]}],

       "msg":"error processing commands",

       "code":400}}

    "

    **********************

    Command start time: 20180519154411

    **********************

    PS>TerminatingError(Invoke-ManageSolrSchemaTask): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: error processing commands"

    >> TerminatingError(Invoke-ManageSolrSchemaTask): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: error processing commands"

    Install-SitecoreConfiguration : error processing commands

    At C:\sitecore-Insall-Framework\install.ps1:82 char:1

    + Install-SitecoreConfiguration @xconnectParams

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

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

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

    Install-SitecoreConfiguration : error processing commands

    At C:\sitecore-Insall-Framework\install.ps1:82 char:1

    + Install-SitecoreConfiguration @xconnectParams

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

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

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

  • I get the error below when runnin the Install script:

    PS>TerminatingError(Invoke-CopyTask): "Cannot validate argument on parameter 'Source'. The " Test-Path $_ " validation script for the argument with value "C:\solr-7.3.1\server\solr\configsets\basic_configs\*" did not return a result of True. Determine why the validation script failed, and then try the command again."

    Install-SitecoreConfiguration : Cannot validate argument on parameter 'Source'. The " Test-Path $_ " validation script

    for the argument with value "C:\solr-7.3.1\server\solr\configsets\basic_configs\*" did not return a result of True.

    Determine why the validation script failed, and then try the command again.

    At C:\Sitecore\Installation\9.0.1\XP Single\Install.ps1:51 char:1

    + Install-SitecoreConfiguration @solrParams

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

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

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

    Install-SitecoreConfiguration : Cannot validate argument on parameter 'Source'. The "

    Test-Path $_ " validation script for the argument with value

    "C:\solr-7.3.1\server\solr\configsets\basic_configs\*" did not return a result of

    True. Determine why the validation script failed, and then try the command again.

    At C:\Sitecore\Installation\9.0.1\XP Single\Install.ps1:51 char:1

    + Install-SitecoreConfiguration @solrParams

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

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

       + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Instal

      l-SitecoreConfiguration

    The C:\solr-7.3.1\server\solr\configsets\basic_configs has two folders _default and sample_techproducts_configs

    The _default folder has a conf folder and inside are the following files:

    managed-schema

    params.json

    protwords.txt

    solrconfig.txt

    stopwords.txt

    synonyms.txt

    Thanks in advance for your help!

    Danny

  • Good article, however it should have included a section to answer all installation errors and their solution. I am getting some error from DB side and still not able to clear it and complete the installation

  • Danny Acuna I had the same issue.

    I had to change the BaseConfig DefaultValue in sitecore-solr.json:33 to _default and the same thing in xconnect-solr.json:33. You could also just rename the folder _default located at server\solr\configsets to basic_configs to match both json files.

  • Hello Mark,

    I think that before running this script, we must to download/import 2 modules: SitecoreInstallFramework and SitecoreFundaments

    According to section #3.2.1 in Installation-Guide-Sitecore-90-Update-2

    Register-PSRepository -Name SitecoreGallery -SourceLocation sitecore.myget.org/.../v2

    Install-Module SitecoreInstallFramework

    Install-Module SitecoreFundamentals

    Best,

    Quách

  • Hi Mark,

    There is a superfluous ' ' in the script you posted.

    Regards, Matthijs