Freigeben über


Scripted Installation of SharePoint 2013 and Office Web Apps Server – From the Field (Part 2)

This is the second post in the Scripted Installation of SharePoint 2013 and Office Web Apps Server series. If you have not already done so, please see part one of this blog series: Farm Topology and Prerequisites.

  1. Farm Topology and Prerequisites
  2. SharePoint Installation, Configuration and Basic Service Applications Deployment
  3. User Profile, Search and Distributed Cache Service Applications Deployment
  4. Office Web Apps Server farm Implementation and Configuration

This blog post will cover:

  • Installation of SharePoint 2013
  • Farm creation and configuration
  • Implementation of:
    • Excel Services
    • Secure Store
    • Usage and Health Data Collection
    • Managed Metadata Services
    • State Services
  • Configuration of services on servers
  • Configuration of usage and health data collection
  • Configuration of state service
  • Configuration of diagnostic logging

Servers in Farm

The following table illustrates the server names and associated server roles for each server:

 Server Name

 Server Role

 SPWEB01

 SharePoint 2013 Web Server 1

 SPWEB02

 SharePoint 2013 Web Server 2

 SPDCache01

 SharePoint 2013 Distribution Cache Server 1

 SPDCache02

 SharePoint 2013 Distribution Cache Server 2

 SPAPP01

 SharePoint 2013 Application Server 1 (CA)

 SPAPP02

 SharePoint 2013 Application Server 2 (CA)

 SPQuery01

 SharePoint 2013 Query Processing and Index Server 1

 SPQuery02

 SharePoint 2013 Query Processing and Index Server 2

 SPCrawl01

 SharePoint 2013 Admin, Crawl, Content Processing, Analytics Processing Server 1

 SPCrawl02

 SharePoint 2013 Admin, Crawl, Content Processing, Analytics Processing Server 2

Installation Prerequisites and Assumptions

  • Please download and extract attached files onto local directory. It has been assumed that this directory is local folder on all SharePoint serves created as E:\Scripts\Install
  • It is assumed that the SharePoint installation directory is D:\ (the location of the media ISO)
  • Update the SilentConfig.xml file with SharePoint product key. Please see Config.xml reference on TechNet for more information.
  • Update the Config.xml file with environment specific information such as, SQL server alias name (To improve ease of maintenance, and make it easier to relocate the database if it is required in the future, create DNS aliases that point to the IP address for all instances of SQL Server), farm account details, admin database and configuration database.  
  • Update the SPCredentials.xml file with service accounts and passwords information.
  • Update the SPServices.xml file with Usage and Health data collection log file location, Usage and Health data collection maximum file size, SQL server name, service application names and related database names.

Install SharePoint (with Internet Connection)

The following steps will only work if each SharePoint server has direct access to the internet. If access is through a proxy, further configuration may be required. Therefore, if internet access is NOT available OR through a proxy, it is recommended to follow the guidelines listed next Install SharePoint (without Internet Connection)

  1. Ensure that the SharePoint installation media is mounted and D:\Setup .exe is accessible
  2. Microsoft SQL Server 2008 R2 Native Client is installed as part of SharePoint 2013 prerequisites installer, however if you are using SQL Server 2012 to host SharePoint databases install Microsoft SQL Server 2012 Native Client 64-bit edition on all SharePoint servers.
  3. Install SharePoint prerequisites and SharePoint binaries by executing the following script on all servers listed above (launch PowerShell as administrator).  This script can be run simultaneously on all servers to save time.

Set-ExecutionPolicy Unrestricted –force E:\Scripts\Install\SPInstaller.ps1 -installPath D:\ -offline "n"

This script will automatically restart servers as required but you will need to log-in to the machine using the install account when prompted. DO NOT RUN the configuration wizard and un-mount the installation media from each server once the script has run successfully

Please note: Windows PowerShell execution policies let you determine the conditions under which Windows PowerShell loads configuration files and runs scripts. The execution policy is not a security system that restricts user actions. Instead, the execution policy helps users to set basic rules and prevents them from violating them unintentionally. Please see About Execution Policy TechNet article.

Install SharePoint (without Internet Connection)

If a direct internet connection is not available during installation, even if a proxy is available, the SharePoint prerequisites installation is likely to fail. This is because, 46 windows components need to be verified and installed (if missing) as well as an additional 8 features specific to SharePoint. By default the prerequisites installer will look to download the missing binaries online and without an internet connection this will fail. The following screenshot shows the first indication of this failure:

To successfully install the necessary prerequisites perform the following steps

Install Windows Server Features and Roles

  1. Mount the Windows Server 2012 installation media (ISO) to drive D:\ and check that directory D:\sources\sxs exists on the image (it will contain lots of folders) on each server in the SharePoint farm
  2. Open a PowerShell prompt as an administer and run the following script from each server in the farm to install all 46 Windows components: 

Set-ExecutionPolicy Unrestricted –force E:\Scripts\Install\WinPreReqs.ps1

      3. Verify that all the roles and features have been successfully installed by executing the following from a PowerShell prompt run as administrator and checking the status the required features listed above are set to installed:

Get-WindowsFeature 

      4. Restart all servers after the script has successfully completed

      5. Un-mount the Windows Server 2012 installation media (ISO) drive from all servers

Install Remaining SharePoint 2013 Prerequisites Offline

Download the following 8 additional prerequisites to a local directory and make available on each server in the farm (network shares are supported):

Open a PowerShell prompt as an administer and run the following script from each server in the farm, when prompted enter the path in which the download prerequisites can be found

E:\Install\scripts\SPPreReqInstall.ps1

Install SharePoint Binaries 

  1. Ensure that the SharePoint installation media is mounted and D:\Setup .exe is accessible
  2. Microsoft SQL Server 2008 R2 Native Client is installed as part of SharePoint 2013 prerequisites installer, however if you are using SQL Server 2012 to host SharePoint databases install Microsoft SQL Server 2012 Native Client 64-bit edition on all SharePoint servers.
  3. Install SharePoint prerequisites and SharePoint binaries by executing the following script on all servers listed above (launch PowerShell as administrator).  This script can be run simultaneously on all servers to save time.

Set-ExecutionPolicy Unrestricted –force E:\Scripts\Install\SPInstaller.ps1 -installPath D:\ -offline "y"

This script will automatically restart servers as required but you will need to log-in to the machine using the install account when prompted. DO NOT RUN the configuration wizard and un-mount the installation media from each server once the script has run successfully

Apply March PU and April CU

Before configuring the farm, two product updates are required to SharePoint 2013 which can be downloaded from the following links (note a server restart is required after each update):

(1)   KB2767999 https://support.microsoft.com/kb/2767999

(2)   KB2726992 https://support.microsoft.com/kb/2726992

The March PU (KB2767999) must be applied before the April CU (KB2726992) and is also a dependency for any future patches or cumulative updates.

Create the Farm

Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch SharePoint Management Shell as administrator. Execute the following command to create the farm: 

 E:\Scripts\Install\SPConfig.ps1 -configLocation E:\Scripts\Install\Config.xml -createJoin create -isCA "y"

Join Servers to the Farm

Login to SPAPP02 (The second Application Server hosting the Central Administration site) and launch SharePoint Management Shell as administrator. Execute the following PowerShell script:

 E:\Scripts\Install\SPConfig.ps1 -configLocation E:\Scripts\Install\Config.xml -createJoin join -isCA "y"

Run the following script on the below SharePoint servers:

 E:\Scripts\Install\SPConfig.ps1 -configLocation E:\Scripts\Install\Config.xml -createJoin join -isCA "n"

 

 Server Name

 Server Role

 SPWEB01

 SharePoint 2013 Web Server 1

 SPWEB02

 SharePoint 2013 Web Server 2

 SPDCache01

 SharePoint 2013 Distribution Cache Server 1

 SPDCache02

 SharePoint 2013 Distribution Cache Server 2

 SPQuery01

 SharePoint 2013 Query Processing and Index Server 1

 SPQuery02

 SharePoint 2013 Query Processing and Index Server 2

 SPCrawl01

 SharePoint 2013 Admin, Crawl, Content Processing, Analytics Processing Server 1

 SPCrawl02

 SharePoint 2013 Admin, Crawl, Content Processing, Analytics Processing Server 2

 Register Managed Accounts

Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch SharePoint Management Shell as administrator. Execute the following command to register managed accounts in the farm:

 E:\Scripts\Install\SPCredentials.ps1 -configLocation E:\Scripts\Install\SPCredentials.xml

Configure Basic Services

Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch SharePoint Management Shell as administrator. Execute the following command to start required services and stop unwanted ones:

 E:\Scripts\Install\SPServices.ps1 -configLocation E:\Scripts\Install\SPServices.xml

 The above script will stop unnecessary services from servers and starts the following service:

  • Excel Services
  • Secure Store
  • Usage and Health Data Collection
  • Managed Metadata Services
  • State Services

Configure Usage and Health Data Collection

Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch SharePoint Management Shell as administrator. Execute the following command to start and configure Usage Service:

 E:\Scripts\Install\SPUsage.ps1 -configLocation E:\Scripts\Install\SPServices.xml

Configure State Service

Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch SharePoint Management Shell as administrator. Execute the following command to start and configure Usage Service:

 E:\Scripts\Install\SPStateService.ps1 -configLocation E:\Scripts\Install\SPServices.xml

You should now have basic services started on all servers in the farm. It is recommended to check Servers in Farm page from Central administrations site to ensure that the correct services are started.

By the end of this blog series the expected farm topology will be as illustrated below:

 Server Name

 Server Role

 Services

 SPWEB01

Web Server

 Microsoft SharePoint Foundation Web Application

 Microsoft SharePoint Foundation Workflow Timer Service

 Managed Metadata Web Service

 SPWEB02

Web Server

 Microsoft SharePoint Foundation Web Application

 Microsoft SharePoint Foundation Workflow Timer Service

 Managed Metadata Web Service

 SPDCache01

Distribution Cache

 Distributed Cache

 Microsoft SharePoint Foundation Workflow Timer Service

 Microsoft SharePoint Foundation Web Application

 SPDCache02

Distribution Cache

 Distributed Cache

 Microsoft SharePoint Foundation Workflow Timer Service

 Microsoft SharePoint Foundation Web Application

 SPAPP01

Application Server

 Central Administration

 Excel Calculation Services

 Microsoft SharePoint Foundation Workflow Timer Service

 Secure Store Service

 User Profile Service

 User Profile Synchronization Service

 SPAPP02

Application Server

 Central Administration

 Excel Calculation Services

 Microsoft SharePoint Foundation Workflow Timer Service

 Secure Store Service

 User Profile Service

 SPQuery01

Search - Query Processing and Index

 Microsoft SharePoint Foundation Workflow Timer Service

 Search Host Controller Service

 Search Query and Site Settings Service

 SharePoint Server Search

 SPQuery02

Search - Query Processing and Index

 Microsoft SharePoint Foundation Workflow Timer Service

 Search Host Controller Service

 Search Query and Site Settings Service

 SharePoint Server Search

 SPCrawl01

Search - Admin, Crawl, Content Processing, Analytics Processing

 Microsoft SharePoint Foundation Workflow Timer Service

 Search Host Controller Service

 Search Query and Site Settings Service

 SharePoint Server Search

 SPCrawl02

Search - Admin, Crawl, Content Processing, Analytics Processing

 Microsoft SharePoint Foundation Workflow Timer Service

 Search Host Controller Service

 Search Query and Site Settings Service

 SharePoint Server Search

 

Lookout for the next blog post, where we complete the farm configuration by provisioning search, user profile services and distributed cache service.

BasicServices_Blog02.zip

Comments

  • Anonymous
    March 19, 2013
    Fantastic work mate, keep up the good work

  • Anonymous
    March 22, 2013
    Have a look at autospinstaller.codeplex.com autospinstallergui.codeplex.com

  • Anonymous
    April 04, 2013
    Fantastic article, this is exactly what I have been looking for, when can we expect the next great blog post??

  • Anonymous
    May 02, 2013
    Fantastic scripts mate. the scripts are totally awesome! ;)

  • Anonymous
    May 07, 2013
    Great work.. Any idea when next posts on this series would be posted.. I am in the process of building farm and remaining pieces would be really helpful...

  • Anonymous
    May 14, 2013
    I am working towards publishing the next blog early next week. Many thanks for all your feedbacks.

  • Anonymous
    October 24, 2013
    when I run this command "E:ScriptsInstallWinPreReqs.ps1" on windows server 2008 r2 SP1 , I get error "Add-windowsFeature : A parameter cannot be found that matches paramater name 'source'. Help please !!!

  • Anonymous
    October 31, 2013
    @diego337 the scripts are written for deployment using Windows Server 2012. If you are on Windows Server 2008 R2 then the features you need to installed are slightly different and the 'source' flag will not be recognised. Try running the following PowerShell: Add-WindowsFeature -Name NET-Framework-Core and then continue with the deployment. Thanks

  • Anonymous
    November 26, 2013
    The comment has been removed

  • Anonymous
    January 01, 2014
    Hi Ashkan, I am getting below error while running the script to install. its says setup can not find or validate the installation file. Please advise. I have manually tested the installer works fine. but while running with SPInstaler.ps1 it gives error; Installing SharePoint... An error has occured. Code:  1392 SharePoint install failed Press any key to continue...:

  • Anonymous
    January 14, 2014
    For those with error code 1392, there is an attribute in the silentconfig.xml file written as "<DATADIR=", it should be "<DATADIR Value=".   This fixed the problem for me.   Great article though, many thanks.

  • Anonymous
    July 23, 2014
    Hi Ashkan, This post is awesome. Also I have a question. If I just have a AD DC and a dedicated SQL server machine and just one SharePoint Server , say "Test-SP2013" , How should I change SPServices.xml file? I did as the following: <AppServerName1>Test-SP2013</AppServerName1> <WebServerName1>Test-SP2013</WebServerName1> <CacheServerName1>Test-SP2013</CacheServerName1> <SrchServerName1>Test-SP2013</SrchServerName1> Please advise. With this configuration , I got bunch of errors. Regards, Amin