domingo, 17 de julio de 2016

Parte 7 – Sharepoint 2016 Creación del Search Service

Indice de Instalación de Sharepoint 2016

En esta parte instalaré el servicio de Search. La arquitectura será la siguiente

image

Crear un folder en “D:\Data\Microsoft\SearchSharepointIndex” en CADA SERVER de la granja.

Dar permisos a los grupos WSS_ADMIN_WPG, WSS_WPG y WSS_RESTRICTED_WPG

También dar permisos sobre el folder:

D:\Data\Microsoft\Microsoft Office Servers\16.0\Data\Office Server\Applications

Al finalizar la ejecución del script tendrá la siguiente configuración

image

Descargar Script

$searchSAName = "Search Service"
$saAppPoolName = "SharePoint Web Services Default"
$searchMachines = @("DNS_WebFrontEndServer","DNS_ApplicationServer")

#El WebFront End Server tiene los siguientes servicios: Query Processing Component
$searchQueryMachine = "DNS_WebFrontEndServer"

#El Application Server tiene los siguientes servicios: Admin Component,Analytics Component,Content Processing Component,Crawl Component, Index Component
$searchCrawlerMachine = "DNS_ApplicationServer"

$indexLocation = "D:\Data\Microsoft\SearchSharepointIndex"
#VER LINEAS 32, 37.

#ALIAS del sql server
$databaseServerName = "SQLSP2016"
$searchDatabaseName = "Sharepoint_Search"


##########################
# Search Service - START #
##########################
#
Write-Host "Creando Search Service y Proxy..."
Write-Host "  Iniciando Services..."
foreach ($machine in $searchMachines)
{
    Write-Host "    Iniciando Search Services en $machine"
    Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $machine
    Start-SPEnterpriseSearchServiceInstance $machine   
}

############CREO EL SEARCH SERVICE APPLICATION ##############

Write-Host "  Creando Search Service Application..."
$searchApp = Get-SPEnterpriseSearchServiceApplication -Identity $searchSAName -ErrorAction SilentlyContinue
if (!$searchApp)
{
    $searchApp = New-SPEnterpriseSearchServiceApplication -Name $SearchSAName -ApplicationPool     $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName $searchDatabaseName
}

$searchInstanceCrawl = Get-SPEnterpriseSearchServiceInstance -Identity $searchCrawlerMachine
$searchInstanceCrawlQuery = Get-SPEnterpriseSearchServiceInstance -Identity $searchQueryMachine

Start-SPEnterpriseSearchServiceInstance -Identity $searchInstanceCrawl
Start-SPEnterpriseSearchServiceInstance -Identity $searchInstanceCrawlQuery

#espero 60 segundos, hasta que inicie
Start-Sleep -s 60

#############################
# Define the search topology
Write-Host "  Defining the Search Topology..."
$initialSearchTopology = $searchApp | Get-SPEnterpriseSearchTopology -Active
$newSearchTopology = $searchApp | New-SPEnterpriseSearchTopology

Start-Sleep -s 60

# Create search components
Write-Host "  Creating Admin Component..."
New-SPEnterpriseSearchAdminComponent -SearchTopology $newSearchTopology -SearchServiceInstance $searchInstanceCrawl

Start-Sleep -s 60

Write-Host "  Creating Analytics Component..."
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newSearchTopology -SearchServiceInstance $searchInstanceCrawl

Start-Sleep -s 60

Write-Host "  Creating Content Processing Component..."
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newSearchTopology -SearchServiceInstance $searchInstanceCrawl

Start-Sleep -s 60

Write-Host "  Creating Crawl Component..."
New-SPEnterpriseSearchCrawlComponent -SearchTopology $newSearchTopology -SearchServiceInstance $searchInstanceCrawl

Write-Host "  Creating Index Component..."
New-SPEnterpriseSearchIndexComponent -SearchTopology $newSearchTopology -SearchServiceInstance

$searchInstanceCrawlQuery -RootDirectory $indexLocation

Start-Sleep -s 60

Write-Host "  Creating Query Processing Component..."
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newSearchTopology -SearchServiceInstance $searchInstanceCrawlQuery

Start-Sleep -s 60

Write-Host "  Activating the new topology..."
$newSearchTopology.Activate()

Write-Host "  Creating Search Application Proxy..."
$searchProxy = Get-SPEnterpriseSearchServiceApplicationProxy -Identity "$searchSAName Proxy" -ErrorAction SilentlyContinue
Start-Sleep -s 60
if (!$searchProxy)
{
    New-SPEnterpriseSearchServiceApplicationProxy -Name "$searchSAName Proxy" -SearchApplication $searchSAName
}
########################
# Search Service - END #
########################

No hay comentarios:

Publicar un comentario