I decided to install Sitecore Experience Commerce 9.1 on my machine. But before I could start with the commerce installation, I had to install Sitecore XP 9.1.1.
I want to share my experience with the most important steps. I hope you find it helpful for your own journey.
1. Install IIS
Press the windows key and start typing “Turn Windows features on or off” and as soon as the search result lists the correct option press enter. Otherwise, you can navigate to “Control Panel” -> “Programs” -> “Turn Windows features on or off”. In the “Windows Features” dialog I have selected following options:
The default installation of Sitecore XP 9.1 will install the Sitecore Identity server. The Identity server is built with .NET Core 2.13. As a result, it requires the .NET Core 2.1.3 hosting module.
2. SQL Server
I decided to use the SQL Server 2017 for the Experience Database (xDB). Therefore, I could skip the installation of the MongoDB Server. The developer edition of the SQL Server is a full-featured free edition. It is licensed for development and test only.
The file you download is a utility, which will download a media folder of the SQL Server Setup. After the download it will automatically launch the SQL Server Installation Center. I have added some screenshots of the most important steps of the setup.
It is a good idea to install also the SQL Server Management Studio. After the installation of the SQL Server Management Studio you must enable the contained database authentication. Open the Management Studio. Connect to the local server. Open a new query window and execute following statements. Afterwards you should see a success message.
EXEC sp_configure 'contained', 1; RECONFIGURE;
3. Install Solr 7.2.1
To enable https for Solr we must generate a self-signed SSL certificate with the Java keytool.
keytool -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass secret -storepass secret -validity 9999 -keystore solr-ssl.keystore.jks -ext SAN=DNS:localhost,IP:127.0.0.1 -dname "CN=localhost, OU=Organizational Unit, O=Organization, L=Location, ST=State, C=Country"
Afterwards we can convert it to the pkcs12 format.
keytool -importkeystore -srckeystore solr-ssl.keystore.jks -destkeystore solr-ssl.keystore.p12 -deststoretype pkcs12
Install the p12 file into the Local Machine store location. Be sure to place the certificate into the “Trusted Root Certification Authorities” store. Then copy the p12 file to the server\etc directory of Solr.
Open the solr.in.cmd in the bin directory of Solr. Search for SOLR_SSL_ENABLED to find the correct part of the script. Uncomment and edit following lines to enable SSL.
set SOLR_SSL_ENABLED=true set SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.p12 set SOLR_SSL_KEY_STORE_PASSWORD=secret set SOLR_SSL_KEY_STORE_TYPE=JKS set SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.p12 set SOLR_SSL_TRUST_STORE_PASSWORD=secret set SOLR_SSL_TRUST_STORE_TYPE=JKS set SOLR_SSL_NEED_CLIENT_AUTH=false set SOLR_SSL_WANT_CLIENT_AUTH=false
You can use NSSM to run Solr as a windows service. Run the following command from a power shell as administrator.
nssm.exe install "Solr 7.2.1"
If you omit the “-f” argument, the Sitecore Install Framework will be unable to stop the Solr service. Then you will get some error messages regarding Solr during the script.
4. Sitecore Install Framework
Launch PowerShell as an administrator. Afterwards register the SitecoreGallery repository with the following command:
Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
Repositories are registered as untrusted by default and you must therefore approve every module that you want to install. To trust the SitecoreGallery run following command:
Set-PSRepository -Name SitecoreGallery -InstallationPolicy Trusted
Sitecore XP 9.1.1 requires Sitecore Install Framework 2.1.0. I highly recommend installing exact this version with the following command:
Install-Module -Name SitecoreInstallFramework -Repository SitecoreGallery -RequiredVersion 2.1.0
5. Sitecore 9.1.1 – Prerequisites
Download the Packages for XP Single. Afterwards extract the zip file. Open the extracted folder and extract the zip file “XP0 Configuration files 9.1.1 rev. 002459.zip”. You don’t need to extract the other three zip files.
Launch PowerShell as an administrator. Navigate to the folder with the configuration files
Install-SitecoreConfiguration -Path .\Prerequisites.json
You may get the error message “The ‘Install-SitecoreConfiguration’ command was found in the module ‘SitecoreInstallFramework’, but the module could not be loaded. For more information, run ‘Import-Module SitecoreInstallFramework’.” This is a hint that the execution-policy is not set on your machine. To solve this problem run the following command and then try again.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
After the command has finished all remaining prerequisites should be installed.
5. Sitecore 9.1.1 – Prerequisites
Copy your license.xml into the folder containing the configuration files. Open the XP0-SingleDeveloper.ps1 in a text editor. Adjust all parameters matching your folders, passwords, etc. Otherwise the script will fail.
I have used following values for the parameters on my machine:
# The Prefix that will be used on SOLR, Website and Database instances. $Prefix = "playground" # The Password for the Sitecore Admin User. This will be regenerated if left on the default. $SitecoreAdminPassword = "b" # The root folder with the license file and WDP files. $SCInstallRoot = "D:\Sitecore\Sitecore 9.1.1 rev. 002459 (WDP XP0 packages)" # The name for the XConnect service. $XConnectSiteName = "$prefix.xconnect" # The Sitecore site instance name. $SitecoreSiteName = "$prefix.sc" # Identity Server site name $IdentityServerSiteName = "$prefix.identityserver" # The Path to the license file $LicenseFile = "$SCInstallRoot\license.xml" # The URL of the Solr Server $SolrUrl = "https://localhost:8983/solr" # The Folder that Solr has been installed to. $SolrRoot = "D:\Tools\solr-7.2.1" # The Name of the Solr Service. $SolrService = "Solr 7.2.1" # The DNS name or IP of the SQL Instance. $SqlServer = "localhost" # A SQL user with sysadmin privileges. $SqlAdminUser = "sa" # The password for $SQLAdminUser. $SqlAdminPassword = "b" # The path to the XConnect Package to Deploy. $XConnectPackage = (Get-ChildItem "$SCInstallRoot\Sitecore 9* rev. * (OnPrem)_xp0xconnect.scwdp.zip").FullName # The path to the Sitecore Package to Deploy. $SitecorePackage = (Get-ChildItem "$SCInstallRoot\Sitecore 9* rev. * (OnPrem)_single.scwdp.zip").FullName # The path to the Identity Server Package to Deploy. $IdentityServerPackage = (Get-ChildItem "$SCInstallRoot\Sitecore.IdentityServer * rev. * (OnPrem)_identityserver.scwdp.zip").FullName # The Identity Server password recovery URL, this should be the URL of the CM Instance $PasswordRecoveryUrl = "http://$SitecoreSiteName" # The URL of the Identity Server $SitecoreIdentityAuthority = "https://$IdentityServerSiteName" # The URL of the XconnectService $XConnectCollectionService = "https://$XConnectSiteName" # The random string key used for establishing connection with IdentityService. This will be regenerated if left on the default. $ClientSecret = "SIF-Default" # Pipe-separated list of instances (URIs) that are allowed to login via Sitecore Identity. $AllowedCorsOrigins = "http://$SitecoreSiteName"
Now that everything is setup, we can finally install Sitecore 9.1.1 with starting the ps1 script from the Sitecore directory. Again, open a Windows Powershell as administrator and run the following command inside the Sitecore directory.
After the script has completed, you can navigate to the website. In my case http://playground.sc or for the backend http://playground.sc/sitecore.
The script has configured three websites in IIS. Each website has his own application pool.
- The identity server is based on IdentityServer4 and allows Single Sign-On across Sitecore services and applications.
- This is the classic Sitecore monolith.
- xConnect is the service layer that sits in between the xDB and any trusted client, device, or interface that wants to read, write, or search xDB data.
The websites and services are using following databases.
Core, Master and Web are the classic databases used from the Sitecore monolith. The identity server also uses the Core database. Most of the other databases are related to the xDB.
Find out more about these databases in the official Sitecore documentation:
This is a very brief summary of my experience with the installation of Sitecore XP 9.1.1. If you have any questions, don’t hesitate to leave a comment. If you have any troubles with your own installation, I’m looking forward to helping you.