Saturday, January 27, 2018

Sitecore 9 Installation Guide

Step by step Sitecore 9 Update 1 Installation guide:

As a part of my Sitecore knowledge Upgradation, I wanted to install Sitecore9 on my local system. Here are the steps that I followed the process.
In order to install the update, you can follow any of the below guides from Sitecore Architects.

Note: I followed the same steps as in the link - http://www.flux-digital.com/blog/install-sitecore-9-update-1-4-simple-steps/ and it works fine.
The below guide covers the complete installation following the same process, some of the issues faced by it and how it can be resolved. In addition, the log file has been attached as well with this guide to give a glimpse of the events and for tracking purpose.
 
PREREQUISITES:
Source: Sitecore 9 Update 1 Installation Guide
IIS Requirement – IIS10.0/IIS8.5
OS Requirement - Windows Server 2016, Windows Server 2012 R2 (64-bit), Windows 10 (32/64-bit), Windows 8.1 (32/64-bit)
.Net Framework Requirement - .NET Framework 4.6.2 or later.
JRE Requirement – Latest version
Visual Studio Requirement - Microsoft Visual Studio 2015 or later.
Database Requirement - Microsoft SQL Server 2016 SP1, Microsoft SQL Server 2014 SP2
Search Indexing Requirement - Solr 6.6.2(for Sitecore 9 update 0 – Solr 6.6.1), Azure Search
Hardware Requirement - 4 core processor, 16GB of RAM
  


Powershell script for installation:
Everyone needs automation in the installation process including me. So, our Sitecore Architects wrote the PowerShell Script to automate the installation process which makes our work easier. (But, if you are a person who feels that a mere installation is not enough and sheer understanding of the whole process is required you can consider reading the below section on the process explanation.)

Assumption: Create a folder “Sitecore9\Resources” under c:\ (where I had all my resource files)
Checklist:
Check 1: When I run the first Powershell Script, I got the below error:
.\Install-Solr.ps1: File C:\Sitecore9\Install-Solr.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see
about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\Install-Solr.ps1
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

·       In order to resolve this problem, run the below command:
PS C:\Sitecore9> Set-ExecutionPolicy RemoteSigned
·       The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the
about_Execution_Policies help topic at http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): A
It will ask you for the Execution policy change. Give "A" and proceed.







Check 2: Before running the script check the Admin access
PS C:\Sitecore9>[bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544")
Check 3: SQL Server  sa username and password
Check 4: JRE version 1.8.0_162
Check 5:  Sitecore License file and copy to C:\Sitecore9\Resources.
Resource Files:
Download the below files and place all files under C:\Sitecore9\Resources:
2.       Sitecore 9.0.1 rev. 171219 (WDP XP0 packages).zip (https://dev.sitecore.net/~/media/8551EF0996794A7FA9FF64943B391855.ashx)
3.       After downloading Sitecore 9, unzip it.  Copy “Sitecore 9.0.1 rev. 171219 (OnPrem)_single.scwdp” and “Sitecore 9.0.1 rev. 171219 (OnPrem)_xp0xconnect.scwdp” to C:\Sitecore9\Resources.
4.       Unzip “XP0 Configuration files 9.0.1 rev. 171219.zip” and copy all the files to C:\Sitecore9\Resources.
At last the C:\Sitecore9\Resources path should look like this:



Now we are ready to run the scripts :
Step 1: Solr Installation
Since Solr was made as core requirement in Sitecore 9, we need to install solr in SSL mode(https). We are using Jeremy Davis Powershell script for installing the solr. In this script we need to mention the below:
    $solrVersion = "6.6.2", -- Version of Solr. We use 6.6.2 for Sitecore 9 update1
    $installFolder = "C:\Sitecore9\Solr", -  Here the solr will get installed
    $solrPort = "8983", - Default solr port
    $solrHost = "sc9solr", - Solr host name
    $solrSSL = $true, -- This should be true, we need to run solr in SSL mode(https)
    $nssmVersion = "2.24", -- NSSM version which we used to install solr as a service(don’t change it)
    $JREVersion = "1.8.0_162" --  JRE version in your local system ( run this command in cmd to find the version : java -XshowSettings:properties -version)
  $JREPath = "C:\Program Files (x86)\Java\jre1.8.0_162" (in the above command you can get the JRE path)
$downloadFolder = " C:\Sitecore9\Resources" – (The path where we downloaded and copied solr zip)

·       Copy the below script as “Install-Solr.ps1” in C:\Sitecore9
·       Open Powershell and run the script
PS C:\Windows\system32>cd \
PS C:\>cd Sitecore9
PS C:\Sitecore9> .\Install-Solr.ps1

The Solr has been installed successfully and you will see the Solr running in SSL Mode(https).


Step 2:  Install Sitecore Install Framework(SIF)
Here we are gonna use PowerShell script wrote by Flux-digital to install SIF.
·       Copy the below script as “Install-SIF.ps1” in C:\Sitecore9
·       Don’t change anything in this script and run in PowerShell.


Step 3:  Install Sitecore 9
·       Copy the below script as “Install-Sitecore9.ps1” in C:\Sitecore9
·       Define the below parameters in the script
$prefix = "sc91" – Instance name prefix
$PSScriptRoot = “C:\Sitecore9\Resources”  -- Path of all resource file
$XConnectCollectionService = "$prefix.xconnect" --  Xconnect name “sc91.xconnect”
$sitecoreSiteName = "$prefix.local" – Instance name “sc91.local”
$SolrUrl = https://sc9solr:8983/solr  -- Solr URL
$SolrRoot = "C:\Sitecore9\solr-6.6.2"  --  Solr Root Path
$SolrService = "solr-6.6.2"  -- Solr Service name
$SqlServer = "\"  -- SQL Server Data source name
$SqlAdminUser = "sa"  - sa username
$SqlAdminPassword = "****"   -- Sa password

·       Run the script and it will take nearly 10mins to execute each step.
·, At last, you can see that the Sitecore instance is up and running.



The below log files of Sitecore 9 Installation:

4 comments:

  1. Followed the same procedure to install sitecore-9 in windows 10 but later i am getting this error while installation. http://sc9.sc/sitecore/admin/PopulateManagedSchema.aspx?indexes=all:

    ReplyDelete
    Replies
    1. I am getting this same error. I keep coming across comments from forum and blog posts that are leading me to believe that it's an issue with the URL Rewrite 2 module but I have it installed and i'm not sure how to fix the issue.

      Delete
  2. Great Site, The Course were so simple and easy to understand.
    Sitecore Online Training

    ReplyDelete
  3. Igained more knowledge from your blog. Keep Doing..
    wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.

    oracle training in chennai

    oracle training institute in chennai

    oracle training in bangalore

    oracle training in hyderabad

    oracle training

    hadoop training in chennai

    hadoop training in bangalore

    ReplyDelete