Skip to content

Instantly share code, notes, and snippets.

@techknowhow
Created November 7, 2018 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techknowhow/52dd24866671e06163fba556a0af2589 to your computer and use it in GitHub Desktop.
Save techknowhow/52dd24866671e06163fba556a0af2589 to your computer and use it in GitHub Desktop.
Sitecore Installation Script
#define parameters
#replace with prefix
$prefix = "xp0"
#replace with postfix
$postfix = "sc"
#replace with path of installation directory
$PSScriptRoot = “D:\Dump\Sitecore 902”
#replace with sitecore version -- should be same as file name of package or else FileNotFound Exception will be thrown
$PSSitecoreVersion = “Sitecore 9.0.2 rev. 180604”
$XConnectCollectionService = "$prefix.xconnect"
$sitecoreSiteName = "$prefix.$postfix"
#replace with solr url
$SolrUrl = "https://localhost:8983/solr"
#replace with solr directory path
$SolrRoot = "C:\Solr6"
#replace with solr service name
$SolrService = "SOLR6"
#replace with SQLServer name -- can be checked in SSMS
$SqlServer = ".SQLServer"
#replace with default sql admin (sa)
$SqlAdminUser = "sa"
#replace with sa password
$SqlAdminPassword="password"
#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\$PSSitecoreVersion (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\$PSSitecoreVersion (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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment