How to Quickly Install Sitecore 9

As some of you probably know, Sitecore 9 is the first version to use Sitecore Install Framework (SIF) to install and configure the environment. This new installation process and the absence of installation executables adds additional requirements that need to be met beforehand.  This post will review the requirements as well as cover some issues you might encounter. But first, let’s review and discuss additional installation requirements.

Hint: This installation process works for newer Sitecore versions (9.0.2) also.

Pre-requisite software

SQL Server 2017

If you are starting with a fresh machine (which I recommend), you’ll need to install SQL Server 2017 (Developer Edition should be fine for your local environment). You can download SQL Server from Microsoft directly from this location.

Visual Studio 2017

Now this might seem like something of little importance, but if you look at the official Sitecore recommendation documentation, you’ll notice that they say you have to have Visual Studio 2017 installed prior to starting the actual installation. If you already have Visual Studio, you can install following “Microsoft .NET Framework 4.6.2 Developer Pack” which will add 4.6.2 support into your Visual Studio 2015.

Hint: If during Sitecore 9 installation you run into an error like the one below, you might want to check to see if you have VS 2017 installed.

Error Code: ERROR_SCRIPTDOM_NEEDED_FOR_SQL_PROVIDER
More Information: The SQL provider cannot run because of a missing dependency.Please make sure that Microsoft SQL Server Transact-SQL ScriptDom is installed.


Powershell 5.1

To check your Powershell version, run this command:

$PSVersionTable.PSVersion

Make sure you are using Powershell 5.1 or higher. If you don’t have 5.1+ installed, follow this link for more information.

Microsoft .NET Framework 4.6.2

Here’s the link to download the right version for your machine. Note: if you installed Visual Studio 2017, you likely already have the .NET Framework 4.6.2.

Microsoft Web Platform Installer 5.0

In order to install Platform Installer 5.0, first enable it in the Control Panel.

Then go to the Internet Information Services (IIS) Manager and click on Get New Web Platform Components.

 

Once that’s complete, you will see the following:

 

In order to complete the next 3 requirements, you’ll need to install Web Platform Installer. Click on the Get New Web Platform Components and once you finish the installation, you will see a new icon under Management.

IIS Platform Components

 

In IIS, click on the newly added icon under Management – Web Platform Installer. In the search bar, type in the name of the corresponding application you’re looking for. In this case, install these modules:

  • Web Deploy 3.6 for Hosting Servers
  • URL Rewrite 2.1 (Use Web Platform Installer to install)
  • Microsoft® SQL Server® Data-Tier Application Framework (17.1 DacFx) if you can not find it over the Web-Platform Installer, follow this link.
  • Web Deploy 3.6 for Hosting Servers Supports (Could be set up with IIS -> “Actions” bar -> Get New Web Platform Components)

At this point, your machine should have all of the necessary pre-requisite software to install Sitecore 9, except for a functional running installation of SOLR.

Setting up SOLR

Now installing SOLR will probably be the most time consuming and error-prone part of the installation. Follow these steps to get it set up correctly.

Hint: You can use Solr-6.6.2 or any latest version of Solr available.

 

  1. First, you need to follow this link and download  solr-6.6.1.zip.
  2. Install JRE if you don’t already have it.
  3. Add a system environment variable called JAVA_HOME that points to your Java installation:
    • Variable Name: JAVA_HOME
    • Variable Value (set as necessary): C:\Program Files (x86)\Java\jre1.8.0_77
  4. Install NSSM at C:/nssm (or the directory of your choice). NSSM is an application that will help set up windows services.
  5. Create and unzip SOLR 6.6.1 into C:/solr
    • Hint: Remove any intermediary folders to avoid a folder structure like C:/solr/solr-6.6.1/server
    • This should now be a valid path on your file system: C:/solr/server
  6. Open Powershell and use NSSM to set SOLR up as a service as follows:
    •           cd C:\nssm\win64 
                ./nssm install "SOLR 6.6.1"
              
  7. The NSSM Service Installer application window will open. Set the following values:
    • Path: C:\solr\bin\solr.cmd
    • Startup Directory: C:\solr\bin
    • Arguments: start -f -p 8983
    • Display Name: SOLR 6.6.1
    • Description: C:\solr\bin\solr.cmd start -f -p 8983
    • Startup type: Automatic
  8. Save the service in NSSM. Open your windows services and start the newly created SOLR 6.6.1 service. You can access windows services by typing ‘services’ into the start menu.
  9. Once the service is started, verify that you can see the SOLR Dashboard at http://localhost:8983/solr/#/
  10. Verify that after a reboot SOLR starts correctly and you can still see http://localhost:8983/solr/#/

Hint: If you ever need to uninstall your SOLR instance, do the following:

    • Open Powershell, and use NSSM to uninstall SOLR
    •       powershell # Use either 64 or 32 bit version according to your computer 
            cd C:\nssm\win64 
            ./nssm remove "SOLR 6.6.1" # name should be installation name from ./nssm install command
          

SOLR SSL Setup

Now that SOLR is installed, we need to set it up to run over SSL.

First, download solrssl, place it under .\Automation\solr-ssl\  and rename it to solrssl.ps1 and run.

Hint: If during this step, you get an error that says:

      • “keytool.exe not on path. Enter path to keytool (found in JRE bin folder)”

You probably need to add a %JAVA_HOME%\bin to the Path variable in Environment Variables as shown in the picture below.

      1. Copy .\Automation\solr-ssl\solr-ssl.keystore.jks and .\Automation\solr-ssl\solr-ssl.keystore.p12 to C:\solr\server\etc
      2. Open C:\solr\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
      3. Restart your SOLR 6.6.1 window service
      4. Verify that you can see the SOLR Dashboard over SSL at https://localhost:8983/solr/#/

Install SIF

Run the install.ps1 script by pasting this into Powershell:

 
Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2;
Install-Module SitecoreInstallFramework;
Install-Module SitecoreFundamentals;
Update-Module SitecoreInstallFramework;
Update-Module SitecoreFundamentals;
Import-Module SitecoreFundamentals -Force;
Import-Module SitecoreInstallFramework -Force;

Hint: Some errors may occur during this step. If you run into something like you see on the following picture, all you need to do is run Set-ExecutionPolicy RemoteSigned in your Powershell instance under Administrator privileges.

Now after all the preparations are done, you can proceed with installing Sitecore using SIF!

The process of installation is pretty straightforward. You create a folder where you want to install your Sitecore 9 instance. In this folder, make sure to have your Sitecore Licence and your Automation folder that you downloaded for the Solr installation. Download your desired WDP XP0 package from Sitecore’s website and place it in the same folder. Now create a folder named sandbox with a folder named scripts inside and place a copy of the Sitecore license inside that. It should look like this:


In the Automation folder under Sitecore-Versions and 9.0, you will find the install.ps1 script. This is a SCORE script that can be obtained with the Scaffolded Solution or downloaded here to install.

 

 .\Automation\Sitecore-Versions\9.0\install.ps1[j] -xp0package "Sitecore 9.0.1 rev. 171219 (WDP XP0 packages).zip" -site "YOURSITENAME" -solrUrl "https://localhost:8983/solr" -solrRoot "C:\solr\" -solrService "SOLR 6.6.1" -sqlServer "YOURSQLSERVERNAME" -sqlAdminUser "YOUADMINNAME" -sqlAdminPassword "YOURSQLPASSWORD" -installDirectory ".\sandbox\" -license ".\license.xml"

Script parameters:
xp0package – package to install you download this from the official Sitecore page.
solrRoot – Where on your computer your SOLR instance is installed
solrService – The name of your SOLR instance under which you installed it.

And if it all goes wrong, you can always use the uninstall script and just add your parameters – into the following script –uninstallscript.

Hint: After copying your SCORE license to the sandbox/App_Data it is wise to restart your IIS by opening Command Prompt under Administrator privileges and typing iisreset.
Note – The Script creates a site with the name “YOURSITENAME”.

After the installation, you will notice that for each website you have two application pools: one named the same way as your website, and the other named your website name .xconnect.

 

Your sandbox will also look different than in any of the previous Sitecore versions. Most of the folders that used to be under sandbox are now under sandbox -> your website name.

Before the installation, we can see that the process has become more demanding and a great number of prerequisites are required. After the installation, we see that the content of the sandbox has also changed in regard to previous versions of Sitecore.
In the future, we can only hope that the process of installation will be even more simplified!

Dragana Simonovic

I am a newly graduated engineer of Mechatronics and a Sitecore enthusiast and certified SCORE developer. As a recent addition to the BrainJocks team, I hope my posts will help people who are just entering the world of SCORE and Sitecore – like myself. The programming technologies I have experience with include MVC.NET, JavaScript, jQuery and C#. In my free time I enjoy traveling and reading.

More posts from Dragana Simonovic >

1 comment on How to Quickly Install Sitecore 9

Michael WestOctober 16, 2018 - Reply

Thank you for sharing.

Add a Comment

Your email address will not be published. Required fields are marked *

Or request call back