1 Prerequisites
1. Sitecore XP 9.0 requires .NET
Framework 4.6.2 or later.
2.
Sitecore XP
can be hosted on the following IIS versions:
I.
IIS 10.0
II.
IIS 8.5
3.
Sitecore XP
can be hosted on the following Microsoft operating systems:
I.
Windows
Server 2016
II.
Windows
Server 2012 R2 (64-bit)
III.
Windows 10
(32/64-bit)
IV.
Windows 8.1
(32/64-bit)
4.
Sitecore XP
9.0 requires Microsoft Visual Studio 2015 or later, targeting .NET Framework
4.6.2.
5.
Sitecore 9.0
supports the following database servers:
I.
Microsoft
SQL Server 2016 SP1: This version supports the XM databases and is the required
and only supported version for the Experience Database (xDB).
II.
Microsoft
SQL Server 2014 SP2: This version only supports XM databases and does not
support the Experience Database (xDB).
6.
Sitecore XP
9.0 supports several search providers.
a.
Solr 6.6.1
For the XP0
and XP1 topologies, Solr is the default search provider.
b.
Lucene
For the XM1
topology, Lucene is the default search provider. Lucene only supports Content
Search and does not support xConnect.
c.
Azure Search
The Azure
Search provider is supported for Azure Cloud PAAS deployments only.
7.
Prerequisites
for the Sitecore Installation Framework
To install the Sitecore Experience Platform
in an on-premises environment using the Installation Framework. To use the
Sitecore Installation Framework, you must download and install:
I.
Microsoft
PowerShell® version 5.0 or later.
II.
Web Platform
Installer 5.0.
2
Technology
1.
MS SQL Server 2016
2.
Solr 6.6.1
3.
MS Powershell ISE
4.
Sitecore 9.0
3 Assumption
This document is prepared
assuming that the reader knows the basics of Sitecore. Hardware requirements
and file system access have not been covered here. I have tried to cover those
steps which are necessary for on-premise installation.
4
Installation of MS SQL Server 2016
1.
If you don’t have installed any version MS SQL
then install MS SQL Server 2016
into mixed authentication mode.
2.
If you have already installed earlier version of
MS SQL and trying to install MS SQL Server 2016
then it would be installed into windows authentication mode.
3.
After successful installation of 2016 it would
ask for SSMS installation. Install SQL Server Management studio(SSMS) also. You
can install from here
also.
5.
Microsoft
SQL Server Data-Tier Application Framework (DAC Fx) version 17.1
Note
If the DACFx
fails to install, you can see the following error message when using the
framework: The SQL provider cannot run with dacpac option because of a missing
dependency. Please make sure that DACFx is installed. To resolve this error,
refer to the following Sitecore Knowledge Base article.
6. Enable Contained Database Authentication
I.
Launch MS
SQL Server Management Studio and log in as an administrator.
II.
Run the
following new query:
sp_configure 'contained database authentication', 1;
GO
RECONFIGURE;
GO
5 Installation Solr 6.6.1
The Sitecore Experience Platform 9.0 supports Solr, Lucene, and
Azure Search as search providers. If you want to use a search index that works
in both Analytics and ContentSearch, we recommend that you use Solr.
I.
Get Solr 6.6.1 from here.
II.
Install JRE before installing Solr if its
required.
IV.
Enable and setup Solr.
V.
Install Solr as a windows service.
6
Installation of
Sitecore Framewrok
1. If you have already installed older version of SIF, please uninstall
otherwise we may get some issue related with certificate.
2. To install Sitecore 9.0 with PowerShell:
a. To add the repository, in Windows,
launch Microsoft PowerShell® as an administrator and run the following cmdlet:
Register-PSRepository -Name SitecoreGallery
-SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
b.
Install the
PowerShell module by running the following cmdlet:
Install-Module
SitecoreInstallFramework
c.
When
prompted to install the module, press Y, and then Enter.
7
Installation of
Sitecore 9
1. Before you run the installation of Sitecore, you must select the
topology or the instance that you want to install. By default, Sitecore
provides XP0, XM1, and XP1 topologies.
Deployment topology
|
Description
|
XP0
|
The Sitecore Experience
Platform, running as two single instances: Sitecore and xConnect. The
Experience Database (xDB) is partially included in both instances.
Use this configuration for local
development and testing.
Note
For security and scalability
reasons, in production environments, it is best practice to use the XM1 or
XP1 configuration.
|
XM1
|
The Sitecore Experience
Management configuration (CMS-only mode) running both the Content Delivery
(CD) and Content Management (CM) roles.
Use this environment when you
are not planning to use the Analytics and Marketing features of the Sitecore
Experience Platform.
Note
When you select this topology,
xDB and xConnect are not available.
|
XP1
|
The Sitecore Experience
Platform configuration running the following separated server roles: Content
Delivery, Content Management, Processing, Reporting, xConnect Collection,
xConnect Collection Search, xDB Reference Data, xDB Automation Operations,
xDB Automation Reporting.
Use this environment when you
are planning a fully featured Sitecore Experience Platform installation.
|
2. After selecting your deployment topology (XP0, XM1, or XP1), you
must download the corresponding web deploy packages and environment
configuration files from the Sitecore Downloads page - https://dev.sitecore.net.
3. Please copy all required files here C:\resourcefiles.
4. Please modify the parameters in below script in as per your configuration
#define parameters
$prefix = "xp0"
$PSScriptRoot = “C:\resourcefiles”
$XConnectCollectionService = "$prefix.xconnect"
$sitecoreSiteName = "$prefix.sc"
$SolrUrl = "https://localhost:8989/solr"
$SolrRoot = "C:\Solr-6.6.1"
$SolrService = "Solr-6.6.1"
$SqlServer = ".\SQL2016"
$SqlAdminUser = "sa"
$SqlAdminPassword="Password12345"
#install client certificate for xconnect
$certParams = @{
Path = "$PSScriptRoot\xconnect-createcert.json"
CertificateName = "$prefix.xconnect_client"
}
Install-SitecoreConfiguration @certParams -Verbose
#install solr cores for xdb
$solrParams = @{
Path = "$PSScriptRoot\xconnect-solr.json"
SolrUrl = $SolrUrl
SolrRoot = $SolrRoot
SolrService = $SolrService
CorePrefix = $prefix
}
Install-SitecoreConfiguration @solrParams
#deploy xconnect instance
$xconnectParams = @{
Path = "$PSScriptRoot\xconnect-xp0.json"
Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002
(OnPrem)_xp0xconnect.scwdp.zip"
LicenseFile = "$PSScriptRoot\license.xml"
Sitename = $XConnectCollectionService
XConnectCert = $certParams.CertificateName
SqlDbPrefix = $prefix
SqlServer = $SqlServer
SqlAdminUser = $SqlAdminUser
SqlAdminPassword = $SqlAdminPassword
SolrCorePrefix = $prefix
SolrURL = $SolrUrl
}
Install-SitecoreConfiguration @xconnectParams
#install solr cores for sitecore
$solrParams = @{
Path = "$PSScriptRoot\sitecore-solr.json"
SolrUrl = $SolrUrl
SolrRoot = $SolrRoot
SolrService = $SolrService
CorePrefix = $prefix
}
Install-SitecoreConfiguration @solrParams
#install sitecore instance
$xconnectHostName = "$prefix.xconnect"
$sitecoreParams = @{
Path = "$PSScriptRoot\sitecore-XP0.json"
Package =
"$PSScriptRoot\Sitecore 9.0.0 rev. 171002 (OnPrem)_single.scwdp.zip"
LicenseFile =
"$PSScriptRoot\license.xml"
SqlDbPrefix = $prefix
SqlServer = $SqlServer
SqlAdminUser = $SqlAdminUser
SqlAdminPassword =
$SqlAdminPassword
SolrCorePrefix = $prefix
SolrUrl = $SolrUrl
XConnectCert =
$certParams.CertificateName
Sitename = $sitecoreSiteName
XConnectCollectionService =
"https://$XConnectCollectionService"
}
Install-SitecoreConfiguration
@sitecoreParams
5. Save the
script as install.ps1 to the C:\resourcefiles folder.
6. In a PowerShell command line,
run the following command:
C:\resourcefiles\install.ps1
8 Uninstallation of Sitecore 9
1. Stop the SQL server service as per here.
2. Login to SSMS and stop all the databases which are related to instance
which you want to uninstall as per here.
3. Stop Solr service.
4. Please modify the parameters in below script in as per your configuration
#define parameters
Param(
[string]$Prefix = "xx",
[string]$SitecoreSiteName = "$Prefix.sc",
[string]$SitecoreXConnect =
"$Prefix.xconnect",
[string]$InstallDirectory =
"C:\inetpub\wwwroot\",
[string]$SolrService = "solr-6.6.2",
[string]$PathToSolr = "C:\Program
Files\solr-6.6.2",
[string]$SqlServer = "xxx",
[string]$SqlAccount = "sa",
[string]$SqlPassword = "XXXX"
)
#Write-TaskHeader function modified from SIF
Function Write-TaskHeader {
param(
[Parameter(Mandatory=$true)]
[string]$TaskName,
[Parameter(Mandatory=$true)]
[string]$TaskType
)
function
StringFormat {
param(
[int]$length,
[string]$value,
[string]$prefix = '',
[string]$postfix = '',
[switch]$padright
)
#
wraps string in spaces so we reduce length by two
$length = $length - 2 #- $postfix.Length - $prefix.Length
if($value.Length -gt $length){
#
Reduce to length - 4 for elipsis
$value = $value.Substring(0, $length - 4) + '...'
}
$value
= " $value "
if($padright){
$value = $value.PadRight($length, '*')
} else
{
$value = $value.PadLeft($length, '*')
}
return
$prefix + $value + $postfix
}
$actualWidth = (Get-Host).UI.RawUI.BufferSize.Width
$width =
$actualWidth - ($actualWidth % 2)
$half =
$width / 2
$leftString = StringFormat -length $half -value $TaskName -prefix '['
-postfix ':'
$rightString = StringFormat -length $half -value $TaskType -postfix ']'
-padright
$message =
($leftString + $rightString)
Write-Host
''
Write-Host
$message -ForegroundColor 'Red'
}
Function Remove-Service{
[CmdletBinding()]
param(
[string]$serviceName
)
if(Get-Service "My Service" -ErrorAction
SilentlyContinue){
sc.exe delete $serviceName
}
}
Function Remove-Website{
[CmdletBinding()]
param(
[string]$siteName
)
$appCmd =
"C:\windows\system32\inetsrv\appcmd.exe"
& $appCmd delete site $siteName
}
Function Remove-AppPool{
[CmdletBinding()]
param(
[string]$appPoolName
)
$appCmd =
"C:\windows\system32\inetsrv\appcmd.exe"
& $appCmd delete apppool $appPoolName
}
#stop windows services
Write-TaskHeader -TaskName "Windows
services" -TaskType "Delete"
Write-Host "Deleting Windows services"
sc.exe delete
$("$($Prefix).xconnect-MarketingAutomationService")
sc.exe delete
$("$($Prefix).xconnect-IndexWorker")
Write-Host "Windows services deleted
successfully"
#stop key windows processes
Write-TaskHeader -TaskName "Windows
Processes" -TaskType "Stop"
Write-Host "Stopping windows processes"
Stop-Process -Name Xconnect* -Force -ErrorAction
SilentlyContinue
Stop-Process -Name maengine -Force -ErrorAction
SilentlyContinue
Write-Host "Windows processes stopped
successfully"
#Stop Solr Service
Write-TaskHeader -TaskName "Solr Services"
-TaskType "Stop"
Write-Host "Stopping solr service"
Stop-Service $SolrService -Force -ErrorAction stop
Write-Host "Solr service stopped
successfully"
#Delete solr cores
Write-TaskHeader -TaskName "Solr Services"
-TaskType "Delete Cores"
Write-Host "Deleting Solr Cores"
$pathToCores =
"$pathToSolr\server\solr\$Prefix*"
Remove-Item $pathToCores -recurse -force
-ErrorAction stop
Write-Host "Solr Cores deleted
successfully"
#Remove Sites and App Pools from IIS
Write-TaskHeader -TaskName "Internet
Information Services" -TaskType "Remove Websites"
Write-Host "deleting websites"
Write-Host "Deleting Website
$SitecoreSiteName"
Remove-Website -siteName $SitecoreSiteName
-ErrorAction stop
Write-Host "Deleting Website
$SitecoreXConnect"
Remove-Website -siteName $SitecoreXConnect
-ErrorAction stop
Write-Host "Websites deleted"
Write-TaskHeader -TaskName "Internet
Information Services" -TaskType "Remove Application Pools"
Write-Host "Deleting application pools"
Write-Host "Deleting apppool
$SitecoreSiteName"
Remove-AppPool -appPoolName $SitecoreSiteName
-ErrorAction stop
Write-Host $("Deleting apppool
$SitecoreXConnect")
Remove-AppPool -appPoolName $SitecoreXConnect
-ErrorAction stop
Write-Host "Application pools deleted"
Write-TaskHeader -TaskName "Internet
Information Services" -TaskType "Remove Folders"
#Remove website folders from wwwroot
Remove-Item $InstallDirectory\$Prefix.sc -recurse
-force -ErrorAction stop
Write-Host "Websites removed from
$InstallDirectory"
Write-TaskHeader -TaskName "SQL Server"
-TaskType "Drop Databases"
#Drop databases from SQL
Write-Host "Dropping databases from SQL
server"
push-location
import-module sqlps
$sqlPrefix = $("DROP DATABASE IF EXISTS
[$($Prefix)")
Write-Host $("Dropping database
$($Prefix)_Core")
$corePrefix = $("$($sqlPrefix)_Core]")
Write-Host $("Query: $($corePrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $corePrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_ExperienceForms")
$xfPrefix =
$("$($sqlPrefix)_ExperienceForms]")
Write-Host $("Query: $($xfPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $xfPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_MarketingAutomation")
$maPrefix =
$("$($sqlPrefix)_MarketingAutomation]")
Write-Host $("Query: $($maPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $maPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_Master")
$masterPrefix = $("$($sqlPrefix)_Master]")
Write-Host $("Query: $($masterPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $masterPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_Processing.Pools")
$ppPrefix =
$("$($sqlPrefix)_Processing.Pools]")
Write-Host $("Query: $($ppPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $ppPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_Processing.Tasks")
$ptPrefix =
$("$($sqlPrefix)_Processing.Tasks]")
Write-Host $("Query: $($ptPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $ptPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_ReferenceData")
$rdPrefix =
$("$($sqlPrefix)_ReferenceData]")
Write-Host $("Query: $($rdPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $rdPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_Reporting")
$repPrefix = $("$($sqlPrefix)_Reporting]")
Write-Host $("Query: $($repPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $repPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_Web")
$webPrefix = $("$($sqlPrefix)_Web]")
Write-Host $("Query: $($webPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $webPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_Xdb.Collection.Shard0")
$xbs0Prefix =
$("$($sqlPrefix)_Xdb.Collection.Shard0]")
Write-Host $("Query: $($xbs0Prefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $xbs0Prefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_Xdb.Collection.Shard1")
$xbs1Prefix =
$("$($sqlPrefix)_Xdb.Collection.Shard1]")
Write-Host $("Query: $($xbs1Prefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $xbs1Prefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_Xdb.Collection.ShardMapManager")
$xbsmPrefix =
$("$($sqlPrefix)_Xdb.Collection.ShardMapManager]")
Write-Host $("Query: $($xbsmPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $xbsmPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_EXM.Master")
$exmmasterPrefix =
$("$($sqlPrefix)_EXM.Master]")
Write-Host $("Query: $($exmmasterPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $exmmasterPrefix -ErrorAction stop
Write-Host $("Dropping database
$($Prefix)_Messaging")
$messagingPrefix =
$("$($sqlPrefix)_Messaging]")
Write-Host $("Query: $($messagingPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U
$SqlAccount -P $SqlPassword -Query $messagingPrefix -ErrorAction stop
Write-Host "Databases dropped
successfully"
pop-location
#Remove Host Entries
Write-TaskHeader -TaskName "Host Entries"
-TaskType "Remove"
Install-Module PsHosts
Write-Host "Removing HostFile Entries"
Remove-HostEntry $SitecoreSiteName -ErrorAction
SilentlyContinue
Remove-HostEntry $SitecoreXConnect -ErrorAction
SilentlyContinue
#Start Solr up again
Write-TaskHeader -TaskName "Solr Services"
-TaskType "Start"
Start-Service $SolrService -ErrorAction stop
Write-Host "Solr Services restarted,
environment is clean to reinstall"
Comments
Post a Comment