Install Sitecore 9.2 from Scratch

Introduction

In this post I’ll provide you with instructions to install Sitecore 9.2 from scratch. This article is aimed at developers who may never have installed Sitecore before and need to work through all the prerequisites before installing Sitecore. It also takes the simplest approach possible to get a working installation of Sitecore 9.2. Sitecore 9.2 includes a Graphical User Interface (GUI) that turns the actual installation into a wizard driven process that is much easier than earlier versions of Sitecore 9.x

The starting point is a clean updated installation of Windows 10 Professional. I have also installed Firefox and Edge Developer Trial. This is the Beta Chromium based version of Edge.

Prerequisites

You are going to need the following programs in order to proceed, and instructions are provided below on how to access and install them.

  • IIS
  • Java
  • Solr
  • SQL Server
  • Visual Studio and Sitecore Rocks
  • Sitecore license or Sitecore Developer Trial license (60 days access)

IIS

The first thing to do is turn on IIS. Go to the Control Panel -> Programs and Features and click on “Turn Windows features on or off” Locate Internet Information Services in teh Windows Features popup and click the checkbox. It will not show a tick, just a square to indicate that not all features are enabled by default

The default settings will be fine for our needs.

Open a browser and enter http://localhost you should see the IIS Welcome splash screen.

Java

Java is required to run Solr so if it is not installed you will need to download and install.  Download the latest version here: https://www.java.com/en/download/windows-64bit.jsp Once the download has completed run the .exe file to install Java

Solr

Download Solr-x.x.x from Apache https://www.apache.org/dyn/closer.lua/lucene/solr/8.2.0/solr-8.2.0.zip Extract the zip to the root of your C drive..  You can check that Solr has ‘installed’ correctly and is working by starting it from an elevated command prompt.  Elevated is when you are running the command prompt as Administrator, right click on the command and select Run as administrator. Navigate to the bin folder that is in the Solr folder. Run the command solr start -p 8984

You should now be able to access the Solr Admin page by entering http://localhost:8984 in your browser of choice. You should see:

Assuming your installation of Solr is working correctly, stop Solr from the command prompt using solr stop -all

If you are working on a VM now is a good time to take a snapshot.

To work with Sitecore 9.2 Solr must use https and must be running as a service. This is going to involve creating a self-signed certificate and editing a configuration file to set up Solr to use https.

In an elevated PowerShell window run:

New-SelfSignedCertificate -CertStoreLocation cert:\LocalMachine\My -DnsName "localhost", "127.0.0.1" -FriendlyName "SolrCert" -NotAfter (Get-Date).AddYears(10)

Use the Cortana search bar to locate and open ‘Manage computer certificates’. Open the Personal -> Certificates folder and export the newly created certificate by right clicking on it and selecting ‘all tasks -> Export’ Select ‘Yes, export the private key’ and ‘Include all certificates in the certification path if possible’ Set a password, I am using the traditional ‘secret’.  Select a location and name for the exported certificate, for example ‘C:\solr-8.2.0\solr_ssl_cert.pfx’.  In the MMC navigate to ‘Trusted Root Certification Authorities -> Certificates and Import the newly exported certificate.

Edit ‘C:\solr-8.2.0\bin\solr.in.cmd‘ and uncomment and edit the HTTPS section so it looks like this (in my case, edit to suit your environment):

Use a command prompt to start Solr using the command solr start -f -p 8984. You should now be able to connect to the Solr Admin page using https://localhost:8984. Note that Firefox may give a warning because it is a self-signed certificate, you an disregard or add an exception. Stop Solr by pressing Ctrl C in the command prompt window.

Finally we need to set Solr to run as a service. Download NSSM (a great little free tool to create and manage Windows Services) from here: https://nssm.cc/download and extract the contents of the .zip file to an appropriate location; I used C:\ so my path to nssm is C:\nssm-2.24\win64\nssm.exe.

In an elevated command prompt run C:\nssm-2.24\win64\nssm install solr82 in the popup enter the path to solr.cmd and the arguments -f -p 8984. Click Install service. The -f argument makes the service run in the foreground so nssm has access to stop and start it. The -p sets the port.

As a final check that everything is working as expected restart the PC (The Solr service should start automatically) and connect to https://localhost:8984

SQL Server

Go to https://www.microsoft.com/en-au/sql-server/sql-server-downloads to download SQL Server, I am using 2017 Express. Download and launch the installer.  I left it on the standard options.  Install SQL Server Management Studio (SSMS), download from https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms You should now be able to launch SSMS and connect to the SQL Server.

There is a little bit of configuration required before it will work with Sitecore though.  The default installation uses Windows Authentication and we need SQL Authentication enabled and the ‘sa’ account activated. Login to SQL Server using SSMS and right click on the Server to access the Server Properties.

On the Security tab ensure that SQL Server and Windows Authentication mode is selected.  Next go to Security -> Logins and open the Properties dialog for ‘sa’. Set a password and ensure that Login is enabled on the Status tab.  It will be necessary to restart the SQL Server service before the changes take effect.  This can be done easily using the Services app:

Finally, we need to allow Contained Database Authentication.  Click New Query and run:

sp_configure 'contained database authentication', 1;

reconfigure;

Visual Studio & Rocks

Download and install Visual Studio, I am using the 2019 Community edition obtainable from https://visualstudio.microsoft.com/vs/

Install Sitecore Rocks extension.  Use the Extensions -> Manage Extensions tool to add Sitecore Rocks.  Restart Visual Studio.  You should now be able to locate Rocks under Extensions:

Sitecore 9.2

Sitecore 9.2 ships with a Graphic User Interface (GUI) that can be used to make the installation process simple if you do not need to customise the installation.  We will be using the GUI for our installation .

You will need permission to access the Sitecore Developer site (https://dev.sitecore.net) and download assets. You will also need a valid Sitecore license to be able to install and use Sitecore. If this is an issue for you consider joining the excellent Sitecore Developer Trial Program. This free trial will allow you to use Sitecore for 60 days.

If have not already, download Sitecore 9.2.0 rev. 002893 (Setup XP0 Developer Workstation rev. r150).zip from dev.sitecore.net, extract the zip into a folder, I would suggest C:\Installer, for example, referred to as the installation folder.  Copy your license into this folder.

Because we are going to use the GUI to install Sitecore most of the needed values are entered during the installation, however, if we want to install Habitat in our new instance of Sitecore there is one small edit required. Habitat is a demo site that follows the Sitecore best practices described in Helix (https://helix.sitecore.net/)

In the installation folder open setup.exe.config in a text editor. Alter the line <parameter name="SitecoreSiteName" value="{Prefix}sc.dev.local /> so that it reads <parameter name="SitecoreSiteName" value="{Prefix}.dev.local /> this will make our site name match the name expected by Habitat.

In the installation folder right click on setup.exe and select Run as Administrator.  Do not skip the Prerequisites stage, it is required to install SIF (if needed) and several Windows and .Net components that are not part of the default Windows installation.  If you run the Sitecore GUI installer again you can skip this step.  Now it should be just a case of entering the values requested by the wizard and allowing it to install Sitecore. 

In my environment the Summary screen looked like:

That’s it! You have now installed Sitecore 9.2 and you are ready to start exploring this great tool.

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 )

Connecting to %s

%d bloggers like this: