guide

A step by step guide for Sitecore 9 installation on your machine

This one is a summary of my own experience for Sitecore 9 installation on my machine. I read a lot of articles + blog posts and decided to go with these ones below:

  1. Sitecore 9 Installation Guide (Note: must log into https://dev.sitecore.net/ before downloading) (Thank Sitecore team!)
  2. Gotchas while installing Sitecore 9 using the Sitecore installation framework by Bas Lijten (Thank you!)
  3. Getting Up and Running with Sitecore 9 by Parashar Mehta (Thank you!)

Happily, I was able to install Sitecore 9 successfully on my machine so that I wanted to write down a step by step guide for myself and for everyone. Hopefully, it’s helpful for your own journey.

Update (11-Jan-2018): for Sitecore 9.0 Update 1 installation, please have a look at this post

Update (21-Jun-2018): for Sitecore 9.0 Update 2 installation, please have a look at this post

Setup Prerequisites

Step by step guide

  1. install the ones below if not yet 😀
  2. install MS SQL Server 2017 if not yet
    • click here to download (Developer Edition for free)
  3. install MS SQL Management Studio 17 if not yet
    • click here to download
  4. create a new folder D:\sc9_install
  5. install SOLR 6.6.1 if not yet
    • click here to download
    • copy / paste solr-6.6.1.zip to D:\sc9_install and unzip it
    • open Command Prompt (run as administrator)
    • sc9_1
    • open a browser, navigate to http://localhost:8983/
    • you would see something like this
    • sc9_2.png
  6. make SOLR 6.6.1 run as a window service
    • download NSSM and install it
    • copy / paste nssm-2.24.zip to D:\sc9_install and unzip it
    • open Command Prompt (run as administrator)
    • sc9_3.png
    • make sure your Solr_6.6.1 window service is running
    • sc9_4.png
  7. set up HTTPS for SOLR 6.6.1
    • download solrssl.ps1 and put it into D:\sc9_install
    • open Windows PowerShell (run as administrator)
    • sc9_5
    • note: you may see the error below
      • sc9_15
    • if that is the case, open Windows PowerShell (run as administrator)
      • Set-ExecutionPolicy -Scope CurrentUser Unrestricted
      • sc9_14
    • copy / paste D:\sc9_install\solr-ssl.keystore.jks and D:\sc9_install\solr-ssl.keystore.p12 to D:\sc9_install\solr-6.6.1\server\etc
    • sc9_6.png
    • open D:\sc9_install\solr-6.6.1\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
    • restart Solr_6.6.1 window service
    • open a browser, navigate to https://localhost:8983/
    • sc9_7
  8. install Sitecore Install Framework if not yet
    • refer to 3.2.1 Installing the Installation Framework Module Using MyGet (Page 20) in Sitecore 9 Installation Guide
    • open Windows PowerShell (run as administrator)
    • use the following commands to install the latest version of SIF
      1. Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
      2. Install-Module SitecoreInstallFramework
      3. Update-Module SitecoreInstallFramework
  9. enable Contained Database Authentication if not yet
  10. download and unzip Package for XP Single (Note: must log into https://dev.sitecore.net/ before downloading)
    • copy / paste Sitecore 9.0.0 rev. 171002 (OnPrem)_single.scwdp.zip to D:\sc9_install
    • copy / paste Sitecore 9.0.0 rev. 171002 (OnPrem)_xp0xconnect.scwdp.zip to D:\sc9_install
    • unzip XP0 Configuration files rev.171002.zip and copy / paste all files to D:\sc9_install
    • sc9_13
  11. copy / paste Sitecore licence file (license.xml) to D:\sc9_install
  12. download sc9_install.ps1 and copy / paste it to D:\sc9_install then open it to correct 03 parameters below:
    • $SqlServer
    • $SqlAdminUser
    • $SqlAdminPassword
  13. open Windows PowerShell (run as administrator)
    • sc9_12.png
    • hopefully there is nothing can stop the installation process now then open a browser, navigate to http://sc9.sc/ and http://sc9.sc/sitecore/ (log into it by using super famous account admin / b)
    • This slideshow requires JavaScript.

  14. DO NOT forget to perform Post-Installation Steps
    • follow Chapter 6 Sitecore XP Post-Installation Steps (Page 37 – 44) in Sitecore 9 Installation Guide
    • Note: you should download the script for 6.1 Add a Recognized User to the xDB Shard Databases here, otherwise you have to update DatabasePrefix from xp1 to sc9

Note: some known issues

  1. Failed to start service ‘Sitecore XConnect Search Indexer…
    • sc9_16
    • due to Sitecore license limitation: you would see this one in the log file Required license is missing: Sitecore.xDB.Base
    • due to unqualified URL of $SolrUrl parameter: ensure having no ending slash (Ex: https://localhost:8983/solr)
  2. you’re using Windows Powershell ISE instead of Windows Powershell
    • sc9_17.png
  3. Unable to connect to master or target server ‘xxx_Processing.Pools’. You must have a user with the same password in master or target server ‘xxx_Processing.Pools’
    • sc9_18
    • my suggestion: have a look at this blog post in order to be able to overcome it
  4. The SQL provider cannot run because of a missing dependency. Please make sure that Microsoft SQL Server Transact-SQL ScriptDom is installed
    • open Command Prompt (run as administrator)
    • run this command “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64\gacutil” /i “C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Extensions\Application\Microsoft.SqlServer.TransactSql.ScriptDom.dll”
    • note: C:\Program Files (x86) may be different on your own machine
  5. Error: Could not load file or assembly ‘Microsoft.SqlServer.TransactSql.ScriptDom, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified
    • my suggestion: ensure to install SQL Server components are listed out in this blog post
  6. Error CREATEing SolrCore…
    • SOLR 6.6.1 has a core lock bug, you should have a try with SOLR 6.6.2
  7. The process cannot access the file because it is being used by another process…
    • my suggestion: DO NOT play with Skype during installation, because of port 443 is in used and xConnect installation would fail
  8. Could not find Solr instance…
    • coH2E
    • my suggestion: ensure you’re playing with Sitecore Install Framework (SIF) version 1.2.0 or later
    • Note: a workaround is to increase the post delay of StartSolr task via xconnect-solr.json and sitecore-solr.json
      • sc9_30
  9. Cannot process argument transformation on parameter ‘Signer’. Cannot convert the “System.Object[]” value of type “System.Object[]” to type “System.Security.Cryptography.X509Certificates.X509Certificate2”
    • press Windows + R (aka Windows Run command), enter mmc to Open box then press OK button to open Microsoft Management Console dialog
      • This slideshow requires JavaScript.

    • press Ctrl+M (aka menu File \ Add or Remove Snap-insto open Add or Remove Snap-ins dialog then add Certificates to Selected snap-ins
      • This slideshow requires JavaScript.

    • delete both DO_NOT_TRUST_SitecoreFundamentalsRoot and DO_NOT_TRUST_SitecoreRootCert
      • sc9_24.png
      • Note: we may have to delete all DO_NOT_TRUST_Sitecore*** ones
    • try installing Sitecore 9 again

My recommendations:

Got issues?

Please send your issues (with screenshots if possible) to viet.hoang.sitecore@gmail.com so that I have a chance to understand your problem and be able to suggest the solution.

Happy Sitecore 9 Installation!

 

33 thoughts on “A step by step guide for Sitecore 9 installation on your machine

  1. Hi,

    In Step 7, I am getting certificate related issue.

    Generating .p12 to import to Windows…
    Importing keystore solr-ssl.keystore.jks to solr-ssl.keystore.p12…
    keytool error: java.io.FileNotFoundException: solr-ssl.keystore.jks (The system cannot find the file specified)

    Trusting generated SSL certificate…
    Import-PfxCertificate : The system cannot find the file specified. 0x80070002 (WIN32: 2 ERROR_FILE_NOT_FOUND)
    At C:\sc9_install\solrssl.ps1:59 char:9
    + $root = Import-PfxCertificate -FilePath $P12Path -Password $secureStringKeystore …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Import-PfxCertificate], Exception
    + FullyQualifiedErrorId : System.Exception,Microsoft.CertificateServices.Commands.ImportPfxCertificate

    Please help me on this issue

    Like

      1. I am trying to install it in a VM which uses Windows Server 2012 R2. So if i need to install the same in this, what are the steps?

        Like

  2. Thank you for the watchout on certs. I was demoing 9.0.0, then wiped that and went for a 8.2.2 to 9.0.1 upgrade, with the xConnect install separately. Kept bombing on the Create Cert part. Deleted the old certs, put in the new, and good to go. Thanks!

    Liked by 1 person

  3. Hi Viet,

    I am getting the below error while executing the custom_dir script which you have mentioned.

    [————————– SetAppPoolCertStorePermissions : FilePermissions —————————————–]
    Install-SitecoreConfiguration : Unable to parse
    [ResolveCertificatePath(variable(‘Security.XConnect.CertificatePath’))] – Exception calling “InvokeWithContext” with
    “2” argument(s): “The running command stopped because the preference variable “ErrorActionPreference” or common
    [TIME] 00:00:03
    parameter is set to Stop: Certificate Cert:\Localmachine\My\3CD5D9455AC7ACEB373597B7DAA0A31451D9B1C2 does not contain
    Private Key. Ensure that it has been exported with the Private Key.”
    At E:\sc9\SIFLess\SIFless-EZ-1518239274.ps1:42 char:1
    + Install-SitecoreConfiguration @xconnectParams
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

    Transcript stopped, output file is E:\sc9\SIFLess\xconnect-xp0.180210.log
    GetConfigFunctionResult : Unable to parse [ResolveCertificatePath(variable(‘Security.XConnect.CertificatePath’))] –
    Exception calling “InvokeWithContext” with “2” argument(s): “The running command stopped because the preference
    variable “ErrorActionPreference” or common parameter is set to Stop: Certificate
    Cert:\Localmachine\My\3CD5D9455AC7ACEB373597B7DAA0A31451D9B1C2 does not contain Private Key. Ensure that it has been
    exported with the Private Key.”
    At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\1.1.0\Private\JsonConfiguration.ps1:182 char:20

    … return GetConfigFunctionResult -FunctionText $InputObject -Param …
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,GetConfigFunctionResult

    Can you please help..what i am doing wrong? I am performing the installation on Windows 10 machine

    Like

  4. Hi Viet,

    Thanks for reverting on this. I tried with the above solution you provided but unfortunately it didn’t worked. I checked my IIS version and it is IIS 8. I think it is causing this issue.

    Like

      1. Hi Viet Hoang,

        Below is the version details

        ModuleType Version Name ExportedCommands
        ———- ——- —- —————-
        Script 1.2.0 SitecoreInstallFramework {Export-WebDeployParameters, Get-SitecoreInstallExtension,…

        Like

      2. I did manual SIF installation since the I got below error when I tried to install using script

        Register-PSRepository : The specified Uri ‘https://sitecore.myget.org/F/sc-powershell/api/v2’ for parameter
        ‘SourceLocation’ is an invalid Web Uri. Please ensure that it meets the Web Uri requirements.
        At line:1 char:1
        + Register-PSRepository -Name SitecoreGallery -SourceLocation https://s
        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo : InvalidArgument: (https://sitecor…wershell/api/v2:String) [Register-PSRepository], Arg
        umentException
        + FullyQualifiedErrorId : InvalidWebUri,Register-PSRepository

        Like

    1. You may consider a workaround is to increase the post delay of StartSolr task via xconnect-solr.json

      “StartSolr”: {
      // Starts the Solr service.
      “Type”: “ManageService”,
      “Params”: {
      “Name”: “[parameter(‘SolrService’)]”,
      “Status”: “Running”,
      “PostDelay”: 8000 -> SHOULD BE UPDATED TO >= 20000
      }
      },

      Like

      1. I have got the below error when I tried to execute “Update-Module SitecoreInstallFramework”

        Update-Module : Module ‘SitecoreInstallFramework’ was not installed by using Install-Module, so it cannot be updated.
        At line:1 char:1
        + Update-Module SitecoreInstallFramework
        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo : InvalidOperation: (SitecoreInstallFramework:String) [Write-Error], WriteErrorException
        + FullyQualifiedErrorId : ModuleNotInstalledUsingInstallModuleCmdlet,Update-Module

        Like

  5. I tried but still got below error

    PS D:\sc9_install> install-module SitecoreInstallFramework -force
    PackageManagement\Install-Package : No match was found for the specified search criteria and module name
    ‘SitecoreInstallFramework’. Try Get-PSRepository to see all available registered module repositories.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
    + … $null = PackageManagement\Install-Package @PSBoundParameters
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Microsoft.Power….InstallPackage:InstallPackage) [Install-Package], Ex
    ception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

    PS D:\sc9_install> Get-PSRepository

    Name InstallationPolicy SourceLocation
    —- —————— ————–
    SitecoreGallery Trusted C:\Users\DAVID~1.NAV\AppData\Local\Temp

    Like

    1. My suggestions:
      1) remove SIF module on your machine manually by normally deleting the folders below:
      + C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework
      + C:\Program Files\WindowsPowerShell\Modules\SitecoreFundamentals
      2) perform Step 8 again

      Like

  6. Facing the below error while installing sitecore 9.1, please suggest on this.

    VERBOSE: [WebDeploy]:[Arg] -SetParam:Name=”Messaging Database Application User Password”,Value=Test12345
    [WebDeploy]:[Path] C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe
    Info: Adding MsDeploy.Site (MsDeploy.Site).
    Info: Adding database (user id=sa;data source=WKWIN6874484;initial catalog=sc9_Processing.Pools)
    Error: The type initializer for ‘Microsoft.SqlServer.Dac.DacServices’ threw an exception.
    Error: The type initializer for ‘SqlSchemaModelStaticState’ threw an exception.
    Error: Could not load file or assembly ‘Microsoft.SqlServer.TransactSql.ScriptDom, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system ca
    nnot find the file specified.
    Error Code: ERROR_UNKNOWN_ERROR_WHILE_CREATING_OBJECTError count: 1.

    More Information: Failed to create type ‘Microsot.SqlServer.Dac.DacServices’. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_UNKNOWN_ERROR_WHILE_CREATING_OBJECT.
    Install-SitecoreConfiguration : Command C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a non-zero exit code – (-1)
    At C:\SC91_INSTALL\sc91_install.ps1:57 char:1
    + Install-SitecoreConfiguration @xconnectParams -Verbose
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

    [TIME] 00:01:24
    Transcript stopped, output file is C:\SC91_INSTALL\xconnect-xp0.180509 (4).log
    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\1.2.1\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

    Like

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.