Over the last few weeks, I have been working on Sitecore, which is one of the top web content management systems currently available on the market. While the application is very powerful and intuitive to use, its installation is definitely not an easy task, at least for someone like me who was doing it for the first time. This is primarily because Sitecore’s main application is dependent on multiple subcomponents and there can be hundreds of reasons why they might not integrate properly and throw you an error. Moreover, it was also very hard to find a proper document that covers the various issues that come up during the installation. That’s why when I finally got it successfully installed, it literally felt like I won a million dollar lottery!
After that painful experience, I decided to write a blog post that would not only describe all the necessary steps required to install Sitecore and it’s sub-components flawlessly but also highlight some of the most
Installing Sitecore on a local system involves several prerequisites, system settings, file updates, and other checks. Therefore, I have divided the whole process into three parts:
- Sitecore 9.1 Prerequisites and installation preparation tasks
- Sitecore 9.1 Installation
- Resolving common installation errors
To keep it short and easy to follow, I will only cover the first two topics in this blog post. In next blog post, I will highlight all the major installation errors that a user can come across and how we can resolve them.
Part 1A: Sitecore 9.1 Prerequisites
Sitecore XP 9.1 has specific requirements for the operating system, IIS Web Server, .NET Framework, and the database server. Therefore, it is very important to be careful about the version of the sub-components. Below is the list of all the prerequisite sub-components (mandatory as well as optional) that you need to have before starting the Sitecore installation.
- OS Windows
- Windows 8.1, 10 (32/64-bit)
- Windows Server 2016
- .NET Core 2.1.3
- Microsoft Visual C++ 2015
- Microsoft SQL Server 2017, 2016 SP2, 2014 SP2
- Microsoft SQL Server Management Studio
- Microsoft Command Line Utilities 13
- MongoDB Server 3.6.6 [ OPTIONAL if you are going to use MongoDB for the Collection database or as a Session State Provider.]
- Microsoft PowerShell® version 5.1 or later
- You can check your current version using the command “$PSVersionTable.PSVersion” in your PowerShell
- Install MS PowerShell 5.1 on MS Windows
- Solr 6.6.2, 6.6.3, 7.2.1
- Visual Studio
- Microsoft Machine Learning Server [OPTIONAL]
- Browser
- Supports Chrome, Firefox, IE11, MS Edge, Safari 9+
- Web Platform Installer
- Web Deploy
Part 1B: Installation preparation tasks
Once you are done with the prerequisites mentioned above, the next step is to perform the following tasks:
- Enable contained database authentication
This is achieved by running the following script in the database:
sp_configure ‘contained database authentication’, 1;
GO
RECONFIGURE;
GO - Download Sitecore installation package
You can find the package for Sitecore XP Single (XP0) from the following location. (Since this file is only available to registered members, you need to have a valid Sitecore dev account to be able to download it.) - Download the official Sitecore installation guide
The latest installation guide can be downloaded from the following location. (You can find it under the Release information section.) - Place all the following Sitecore installation files in the same folder.
- Sitecore 9.1.0 rev. 001564 (OnPrem)_single.scwdp.zip
- Sitecore 9.1.0 rev. 001564 (OnPrem)_xp0xconnect.scwdp.zip
- Sitecore.IdentityServer 2.0.0 rev. 00157 (OnPrem)_identityserver.scwdp.zip
- sitecore-solr.json
- xconnect-solr.json
- createcert.json (for developer environments)
- sitecore-XP0.json
- xconnect-xp0.json
- IdentityServer.json
- Prerequisites.json
- licence.xml ( 60 days developer’s Licence)
- XP0-SingleDeveloper.json
- XP0-SingleDeveloper.ps1
- Download the
nssm (Non-Sucking Service Manager)
This application is used to create a service instance of Solr.- The latest version can be downloaded from here
- Make sure you have the latest version of java (>1.8 )
- Check it by running “java -version” command in cmd
- If you don’t have one, download it from here
- Update the PATH of the following applications in System Environment Variable
This will allow you or the installation system to call their service without specifying their path every time.- Java
- Apart from adding the path in common “Path” variable, create a separate JAVA_HOME variable and assign it the java path
- NSSM
- Solr
- Java
- Generate self-signed certificates to enable SSL for SOLR
Sitecore installation requires SSL certification for Solr. Below are some good articles where you can learn how to do this easily. - Install Sitecore Install Framework (SIF)
Execute the following commands in PowerShell ( run as administrator)- Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
- Install-Module SitecoreInstallFramework
- Update-Module SitecoreInstallFramework
- Update the following files with correct details appropriate for your environment
- XP0-SingleDeveloper.ps1
Role: The main PowerShell executable file. All the default parameters that are required to install a developer workstation are stored in it.- $Prefix – It will be used on SOLR, Website and Database Instances
- $SitecoreAdminPassword – Password for Admin user
- $SCInstallRoot – The root folder with the license file and WDP files
- $SolrUrl – The URL of the Solr Server
- $SolrRoot – The Folder that Solr has been installed to
- $SolrService – The Name of the Solr Service created using
nssm - $SqlServer – Name of the SQL instance/server
- $SqlAdminUser – A SQL user with sysadmin privileges
- $SqlAdminPassword – The password for $SQLAdminUser
- Createcert.json
Role: Creates the self-signed certificate for the Sitecore Identity server.- CertPath – The physical path on disk where certificates will be stored
- CertPath – The physical path on disk where certificates will be stored
- IdentityServer.json
Role: Sets-up thestand-alone . Net Core website for the Sitecore Identity server and contains the connection strings to the Core database that is installed bysitecore -XP0.json.- LicenseFile – The path to the Sitecore license file
- SqlServer – Name of the SQL instance/server
- Xconnect-solr.json
Role: Creates the Solr indexes that are used by xConnect.- SolrUrl – The URL of the Solr Server
- SolrRoot – The Folder that Solr has been installed to
- SolrService – The name of the Solr service
- BaseConfig – Solr
configset to copy as a base for each core
- Xconnect-xp0.json
Role: Sets-up the xDB and xConnect web services on IIS, the xDB databases on SQL Server, and secures them with the provided certificates.- LicenseFile – The path to the Sitecore license file
- SqlAdminUser – The SQL admin user account
- SqlAdminPassword – The SQL admin password
- SolrUrl – The URL of the Solr Server
- SqlServer – The SQL Server where databases will be installed
- Sitecore-solr.json
Role: Creates the Solr indexes that are used by Sitecore.- SolrUrl – The URL of the Solr Server
- SolrRoot – The Folder that Solr has been installed
- SolrService – The name of the Solr service
- BaseConfig – Solr
configset to copy as a base for each core
*NOTE: In Solr 6.6.2, it’s default value should be “basic_configs” whereas in Solr 7 it should be “_default”
- sitecore-XP0.json
Role: Sets-up a stand-alone Sitecore website on IIS and the content databases on SQL Server.- LicenseFile – The path to the Sitecore license file
- SqlAdminUser – The SQL admin user account
- SqlAdminPassword – The SQL admin password
- SqlServer – The SQL Server where databases will be installed
- SolrUrl – The URL of the Solr Server
- XP0-SingleDeveloper.ps1
***Important: When you are updating the file locations in JSON files, make sure to provide the escape character for a backslash “\”.
Part 2: Sitecore Installation
You are almost done with the Sitecore installation. Here is what you need to do next.
- Open a PowerShell which administrative right
- [Optional] if you have not installed Sitecore before, execute the following command
- Set-ExecutionPolicy -Scope CurrentUser Unrestricted
- Change the directory to the folder where you have stored all the installation files
- Execute the command: .\XP0-
SingleDeveloper - Relax and have a cup of coffee as the installation script will execute on its own.
If all the steps mentioned above are executed correctly, the process will go smoothly without any error and in 20-30 minutes the whole installation process should be complete. Once it is done, you will see the Admin password (as shown below) to log into the Sitecore Admin account.
Need assistance with Sitecore installation, architecture, enhancement, or implementation? Feel free to reach out to our Sitecore lead Eric Ramseur eric.ramseur@anant.us or email us at solutions@anant.us.