The new version of Sitecore includes lots of new features and some important updates as well. Some of these changes require sensible server modifications.

Sitecore provides different tools to install Sitecore instance easily. This following tutorial shows you an easy way to use them and getting your Sitecore server ready to rock this version!

Image result for Sitecore 9 logo

Before that, just make sure to fasten your seatbelts, and to install this needed software:

Prerequisites

  1. Windows Powershell version 5.x
  2. Sitecore license XML file
  3. MS SQL Server version 2016 (NOT 2017 since it still not officially supported by Sitecore yet)
  4. MS SQL Management Studio

Note: Please ensure the SQL Server has enabled the mixed mode authentication: SQL Server and Windows Authentication mode.

  1. Java Environment (SDK and JRE) version 8.x
  2. Web deploy version 3.6

https://www.microsoft.com/en-us/download/details.aspx?id=43717&tduid=(5d6efda7355a410148cd4206fb33ab3b)(152407)(1806294)(725X175X56c4ef9d4b99a35fedb1ce7809df917c)()

Note: Please check the compatible table from Sitecore: https://kb.sitecore.net/articles/087164

Let’s go !

STEP 1 Setup and Install required components

Setup Environment variables

Go to My Computer and open Environment Variables as figure below

  • Add new two environment variables into the list as the figure below:

Update the PATH variable:

Click OK to confirm.

Note: We have two separate variables:

  • The JAVA_HOME path, where is the Java SDK, installed by download it from Oracle Java website.
  • The JRE_HOME is the place of the Java Runtime Environment installation folder
  • Note:
    • Please download both SDK and JRE for ensuring the SOLR can work properly. Download here:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • You need to ensure that all files which have been downloaded need to be unblock.

Install SOLR

  • Extract it into a specific folder such as D:\solr-6.6.2
  • Download the NSSM tool from the link: https://nssm.cc/download
    • Note: You can use the prerelease build 2.2.4-101 to avoid an issue with services failing to start.
  • Extract and get the nssm.exe file
  • Put it into the same bin folder of the installation SOLR folder:
  • Open Command Prompt (run as an Administrator)

Go the SOLR bin folder as above:

Type: nssm install solr_6.6.2

Click on Install service button for installing the Solr windows service

 

Note: Please turn off all Solr console instance if there is an instance running before we install SOLR run as a windows service to avoid conflict.

When the SOLR being installed successfully you can access it as the figure below:

Setup SSL for SOLR

  • Download the solrssl.ps1 from the link:

https://gist.githubusercontent.com/kamsar/c3c8322c1ec40eac64c7dd546e5124de/raw/01374d52253abb090d7f0195b8680c8396558f66/solrssl.ps1

Many thanks to Kam Figy (https://kamsar.net/index.php/2017/10/Quickly-add-SSL-to-Solr/)

  • Put it into a specific folder such as D:\sc9\solrsslconfiguration

Open Windows PowerShell (run as Administrator)

Execute the command line:

Set-ExecutionPolicy -Scope CurrentUser Unrestricted

Press A to allow we can execute the script without any problems with the permissions.

Execute command .\solrssl.ps1 as figure below:

Copy two files above and put them in the SOLR installation folder \server\etc folder

Open the solr.in.cmd (this is the configuration as input parameters of SOLR), adding all lines as in the figure put them into the end of the file.

Restart the solr_6.6.2 service and now you have to browse the SOLR admin tool with the https protocol.

Installing the Sitecore Installation Framework

  1. Launch PowerShell under Administrator right.
  2. Using Windows PowerShell to install by followings ordering command line:

Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2

Note: This command line set up a repository specific to Sitecore

  1. Install the Sitecore Installation Framework by Powershell:

Install-Module SitecoreInstallFramework

  1. When prompt to install, approving it by press Y and then press ENTER to confirm.

Note: If you have installed the Sitecore Installation Framework so you only need to update the latest version of the Sitecore Installation Framework by executing the command line:

Update-Module SitecoreInstallFramework

Enable Contained Database Authentication:

To enable the SQL server to allow the creation of users when using the Sitecore Installation Framework, you must ensure that the target SQL Server is configured correctly. To configure the target SQL Server to allow users and logins to be contained at the database level:

  1. Launch MS SQL Server Management Studio and log in as an administrator.
  2. Run the following Query:

sp_configure ‘contained database authentication’, 1;

GO

RECONFIGURE;

GO

STEP 2 Installing the Sitecore version 9.1 Update 1:

  1. Go the link:

https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/90/Sitecore_Experience_Platform_90_Update1.aspx

  1. Download appropriate installation package.

Note:

  • We install all on one server with full features so we must choose XP Single otherwise for scaled clustering servers such as multiples CDs, CMs and separate database and xDB servers then we have chosen XP Scaled.
  • XM package is the package only available for Content Management system without xDB as well as Marketing module.
  1. Unzip it into an individual folder (in the sample we have used D:\SC9\Configuration)

Note: Please Unblock those files for ensuring it allows to run on the server.

  1. Unzip XP0 Configuration files 9.0.1 rev.171219.zip and copy and paste all files into the D:\SC9\Configuration:

  1. Get three files sitecore-XP0.json, xconnect-XP0.json and sc91_install.ps1 from the place:

https://github.com/toanvo/AzureCutomization

Note: Please check and unblock those files.

Copy and overwrite two files: sitecore-XP0.json, xconnect-XP0.json.

Open sc91_install.ps1 script and modify values of parameters in that file:

No Name Description
1 $prefix The prefix of website Sitecore which is used to put the prefix website and Sitecore database names.
2 $PSScriptRoot The folder where contains installation scripting files and Sitecore Installation zip files. Please update following appropriate values.
3 $XConnectCollectionService The xconect endpoint name.
4 $sitecoreSiteName The web site name which is used to create on the IIS. Please update following appropriate values.
5 $SolrUrl The HTTP endpoint of the Solr administration site. Please update following appropriate values.
6 $SolrService The Solr windows service name which is the name of the Solr the windows service name above. Please update following appropriate values.
7 $SqlServer The MS SQL instance server name. Please update following appropriate values.
8 $SqlAdminUser The MS SQL sysadmin role username. Default is sa name. Please update following appropriate values.
9 $SqlAdminPassword The password which is matched with the MS SQL Server admin name above. Please update following appropriate values.

Execute it by launch Windows PowerShell as Administrator:

After you setup successfully then you can launch the Sitecore website. However, we are still one step to wrap up everything.

STEP 3 Post installation (Configuration for xDB)

  1. Configure username and password:
    1. Launch MS SQL Server Management Studio and login as an administrator
    2. Open a new query windows, paste the script below

:SETVAR DatabasePrefix sc91

:SETVAR UserName collectionuser

:SETVAR Password Test@12345

:SETVAR ShardMapManagerDatabaseNameSuffix _Xdb.Collection.ShardMapManager

:SETVAR Shard0DatabaseNameSuffix _Xdb.Collection.Shard0

:SETVAR Shard1DatabaseNameSuffix _Xdb.Collection.Shard1

GO

IF(SUSER_ID(‘$(UserName)’) IS NULL) BEGIN

CREATE LOGIN [$(UserName)] WITH PASSWORD = ‘$(Password)’;

END;

GO

USE [$(DatabasePrefix)$(ShardMapManagerDatabaseNameSuffix)]

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N’$(UserName)’) BEGIN

CREATE USER [$(UserName)] FOR LOGIN [$(UserName)]

GRANT SELECT ON SCHEMA :: __ShardManagement TO [$(UserName)]

GRANT EXECUTE ON SCHEMA :: __ShardManagement TO [$(UserName)] END;

GO

USE [$(DatabasePrefix)$(Shard0DatabaseNameSuffix)]

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N’$(UserName)’)

BEGIN

CREATE USER [$(UserName)] FOR LOGIN [$(UserName)]

EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = ‘$(UserName)’

END;

GO

USE [$(DatabasePrefix)$(Shard1DatabaseNameSuffix)]

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N’$(UserName)’) BEGIN

CREATE USER [$(UserName)] FOR LOGIN [$(UserName)]

EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = ‘$(UserName)’ END;

GO

Note:

  • Please change the parameters (DatabasePrefix, Password) which have been bold on the script above based on your environment. Please consider the Password value has to match with the password which has been configured in the Sitecore
    • Turn on SQLCMD Mode for ensuring the compiler can compile the script above.
      1. Execute it.
      1. Rebuild the Search Indexes and the Link Databases:

After you install Sitecore, you must rebuild the search indexes, and the Link databases by go to Control Panel inside Sitecore Administration:

      1. In the Indexing Manager dialog box, click Select all, and then click Rebuild.
      2. Rebuild the Link databases for the Master and Core databases.

If you follow properly these steps, your Sitecore 9.0.1 environment should be installed, configured, and ready to be explored. Enjoy your journey! If you have met any problem please put your comment following this blog. My pleasure to help you.