Automated SharePoint 2010 Installations: Step-by-step

Introduction

I have been using automated installations for a few months now and have used both in-house scripts and the AutoSPInstaller from CodePlex. I have lately used AutoSPInstaller and wanted to go through the various steps used to prepare the installation media.

Update: I have updated the documentation according to v2 of AutoSPIntaller and explain the setup of the configuration files in detail.

Preparing the base media

1. Either download the SharePoint 2010 ISO from MSDN subscriber downloads or copy them from the installation media. I extract the files into the folder c:\SP2010.

2. Run Download-All SP2010 Prereqs.ps1 and add these files to c:\SP2010. This will add all the pre-requisite files into our base media catalog for offline installations. Most servers I install are behind a firewall and do not allow direct access to the internet.

3. Download AutoSPInstaller from CodePlex and extract the files into the c:\SP2010 folder.

4. Download the SharePoint 2010 Language Packs and add them to your folder at c:\SP2010\LanguagePacks. NOTE! Rename the files by appending the locale to the end of the file. For example, ServerLanguagePack_sv-se.exe for Swedish.

5. Slipstream the latest hotfix by downloading the cumulative update package. Extract the contents as:

office2010kb2512800fullfilex64glb.exe /extract:.\

Locate the .msp files and add them to the c:\SP2010\Updates folder.

Your folder layout should now look like this:

image

Prepare server hardware and software

The following requirements must be fulfilled prior to the installation of SharePoint Server 2010.

Hardware Requirements

Component

Minimum Requirement

Processor

64-bit, four cores

RAM

8gb for single server, 16gb for multi-server environments. For databases above 2 terabytes see the link below.

 

Recommend 16gb as standard.

Hard disk

80gb for system drive. For databases, see Capacity management and sizing for SharePoint Server 2010.

 

From experience, I recommend 160gb for system drive and a separate 50gb drive for logs and search indexes.

For full details see http://technet.microsoft.com/en-us/library/cc262485.aspx

 

Software Requirements

Component

Minimum Requirement

OS

Windows Server 2008 64-bit with SP2

or

Windows Server 2008 R2 64-bit (recommended)

OS Edition

Standard is customary for SharePoint servers. Will work with Standard, Enterprise, Data Center or Web Server with SP2. Clustered SQL servers require Enterprise edition.

Server Roles and Features

No features or roles installed. Note: Install base Windows with drivers only, the setup will take care of IIS and other components.

Database

SQL Server 2005 with SP3 and Cumulative Update package 3

or

SQL Server 2008 with SP1 and Cumulative Update 2

or

SQL Server 2008 R2 (recommended)

For full details see http://technet.microsoft.com/en-us/library/cc262485.aspx.

System Accounts

These accounts must be created and passwords must be made available before installation begins.

Naming standards are examples and may be changed to reflect internal policies.

Account Type

Account Name

Rights

Install Account

SPS_INSTALL

Full administrator rights on all SharePoint and SQL servers. Will be disabled after install is completed.

SQL Service Account

SQL_SERVICE

If not already installed, domain account with no local rights above Domain User.

Farm Administrator

SPS_FARM

SQL roles DBCREATOR and SECURITYADMIN.

Application Pool

SPS_APP_POOLn

One account per application. For example one per intranet, extranet and public website.

Naming standard could be SPS_APP_POOL1 or SPS_APP_POOL_INTRANET.

No local rights or SQL rights above Domain User.

My Site SPS:MYSITE

No local rights or SQL rights above Domain User.

Services

SPS_SERVICES

No local rights or SQL rights above Domain User.

Search Agent

SPS_SEARCH

No local rights or SQL rights above Domain User.

Search Crawl Access

SPS_CRAWL

No local rights or SQL rights above Domain User.

Profile Access

SPS_PROFILE

No local rights or SQL rights above Domain User.

 

Important: Account needs “replicate changes” rights in Active Directory. For more info, see TechNet. For a script to test if the account was set up correctly, see my CodePlex site.

Cache Admin SPS_CACHEADM

No local rights or SQL rights above Domain User.

Cache Reader SPS_CACHERD

No local rights or SQL rights above Domain User.

For more information see http://technet.microsoft.com/en-us/library/ee662513.aspx

Prepare server for unATtended installation

Personally, I like drinking coffee better than staring at a monitor. Therefore, I want the installation to bother me as little as possible, i.e. not at all. I don’t want meaningless confirm clicks or silly errors.

1. Turn off the nag by typing “Run…”, “msconfig”, “Tools” and launch “Change UAT Settings”.

image

image

2. Turn off warning on file open by typing “Run…” “gpedit.msc”, “User Configuration”, “Administrative Templates”, “Windows Components”, “Attachment Manager”, “Inclusing list for low file types” and add “.exe;” to the list.

lowrisk 

For more info, see http://www.windowsreference.com/windows-7/how-to-disable-open-file-security-warning-in-windows-7/

Prepare The Scripts

First of all, open the file config.xml and config-OWA.xml and enter the SharePoint 2010 product key under the PIDKEY parameter. Once done, open the files in Internet Explorer to ensure they open without errors, i.e. that they contain well formed XML.

Now rename the AutoSPInstallerInput.xml file by appending the name of your server. For example, AutoSPInstallerInput-SPQASRV7873.xml. By not having the original file present, we ensure that our environment specific file is loaded and forms a way of documenting the installation.

Open the renamed file and perform the following changes:

  • Set the farm passphrase at Configuration/Farm/PassPhrase. Note: Make sure that the farm passphrase is complex or the installation will fail.
  • Reference the farm account at the following locations:
    • Configuration/Farm/Account/Username
    • Cond
  • Reference your database server at the following locations:
    • Configuration/Farm/Database/DBServer
  • Map the service accounts to the ones mentioned earlier as
    • Add SPS_SERVICE account to Configuration/Farm/ManagedAccounts where CommonName is “spservice” and to Configuration/EnterpriseServiceApps/VisioService/UnattenderIDUser
    • Add SPS_SEARCH account to Configuration/Farm/ManagedAccounts where CommonName is “searchservice” and to Configuration/ServiceApps/EnterpriseSearchService/Account and Configuration/ServiceApps/EnterpriseSearchService/EnterpriseSearchServiceApplications/
      EnterpriseSearchServiceApplication/AdminComponent/ApplicationPool/Account
    • Add SPS_CRAWL to Configuration/ServiceApps/EnterpriseSearchService/EnterpriseSearchServiceApplications/
      EnterpriseSearchServiceApplication/ContentAccessAccount
    • Add SPS_APP_POOL_PORTAL account to Configuration/Farm/ManagedAccounts where CommonName is “portalapppool” and to Configuration/WebApplications/WebApplication[type=Portal]/applicationPoolAccount and Configuration/WebApplications/WebApplication[type=Portal]/SiteCollections/SiteCollection/owner Configuration/WebApplications/WebApplication/applicationPoolAccount
    • Add SPS_MYSITE account to Configuration/Farm/ManagedAccounts where CommonName is “mysiteapppool” and to Configuration/WebApplications/WebApplication[type=MySiteHost]/applicationPoolAccount and Configuration/WebApplications/WebApplication[type=MySiteHost]/SiteCollections/SiteCollection/owner
    • Add SPS_CACHEADM account to Configuration/Farm/ObjectCacheAccounts/SuperUser
    • Add SPS_CACHERD account to Configuration/Farm/ObjectCacheAccounts/SuperReader

In addition, follow the comments in the file to add optional changes.

Execute the script

Run the script c:\SP2010\AutoSPInstaller\AutoSPInstallerLaunch.bat by executing the file with administrative privileges.

image

Post execution tasks

I’m sure you had a nice coffee by now, so it’s time to document the progress. I normally save any reports from the desktop and also execute the SharePoint Auto Documenter from Sezai. I have compiled a version for SharePoint 2010 here:

http://lekman.codeplex.com/releases/view/55953

Lastly, I check over the farm in health reports and then disable the install account in AD.

20 comments:

ee61re said...

Excellent step-by-step on Automated SharePoint 2010 Install / Config

Richard said...

This page helped but we're stil having trouble.

How do the System Accounts map to the AutoSPInstallerInput.xml? Some of them are self-explanatory but some are not.

Thank you.

Tobias Lekman said...

Hi,

I see you are using v2 of the installer. You start off by registering all your system accounts under Configuration/Farm/ManagedAccounts and these should include

- Farm admin
- Application pool (services)
- Application pool (portal or app)
- Service account(s)
- Profile crawl

On top of this, you will need an account for the install account, which should be local admin on all SharePoint servers and also dbcreator and securityadmin on your SQL.

Your profile access account also need rights to iterate changes in the AD.

You also need to specify, if needed, the super fetch cache accounts under ObjectCacheAccounts section.

Accounts to go where:

- Add the portal pool account under WebApplications/WebApplication/applicationPoolAccount.

- Add the services application pool account under the MySiteHost application.

- Use the SERVICE account for the EnterpriseSearchService service, no password

- Use the services application pool account for the ApplicationPool under EnterpriseSearchServiceApplication

- Specify content access account and password under EnterpriseSearchServiceApplication/ContentAccessAccount. This is not added as a managed account.

Good luck!

Tobias Lekman said...

As an update, I added a whole section of account mapping to make this easier.

Son said...

Hi,
1- Which is the install account for SQL Server ? SPS_INSTALL, or SQL_Service ?
2- for the out-going email address, it should be created for SPS_FARM or SPS_INSTALL ?

Many thanks and best regards

Tobias Lekman said...

Hi Son,

1: Use SQL_Service for the SQL server installation
2: Outgoing email can be anything, I prefer to set up either a group email address or a "[email protected]" address. Just make sure your email server accepts the address - in Exchange, you just have to have an address set up that matches the entry.

Abdulmunem said...

Hi,
Thank you for the great document !i have some questions:
1- Can i use the account SPS_SERVICES, as service account for PerformancePoint,Visio, Excel,,etc or is it better to create for each of them one service account ?
2- My topoology is two front server (with NLB) and two Database servers (Clustor A\P A\P ), and two index server (Two index partion mirrored) ,what the modifications i have to do in the AutoSPInstallerInput.xml file ? and what are the steps ?

Many thanks and best regards.

Tobias Lekman said...

Hi Abdulmunem,

First, yes you can use the SPS_SERVICES account for the office services.

Second, I have not tried setting up a partitioned index using the scripts myself yet, but I think you should specify server specific versions of your AutoSPInstallerInput.xml files and specify the names of the servers and roles under EnterpriseSearchServiceApplications/EnterpriseSearchServiceApplication per each config. As default, the script installs all the components on the server. Remove these sections from the WFE config files and first index server, then set up the server names using full names instead of localhost when executing the setup on the last server.

Abdulmunem said...

Hi Tobias,
When i try to open any site i got the following message: An unexpected error has occurred.
I made sure that the pool accounts are added to "Log as a batch job" in the local group policy, but always the same error.
When i added the pool accounts to the Local administrator group , the site started to work perfectly !.
But i dont think it is the right way to keep these accounts in the local Administrator group right ? any solution for this issue ?

Many thanks.

Tobias Lekman said...

Hi Abdulmunem,

I have seen these issues before and they are normally due to security issues. They are also normally resolved by recreating the web application but obviously it is preferable that the whole installation is scripted.

First of all, have you analyzed the ULS logs and got a more detailed error?

I would suggest that you post a bug on the AutoSPInstaller site.

Paul Beck said...

Thanks for your post on using AutoSPInstaller, I have referenced it in a post on my blog http://blog.sharepointsite.co.uk/2010/11/installing-sharepoint-using-dedicated.html

Paolo said...

Hi,
I am trying to install two WFE using this script, First one with all app services and other without.
But after i finished i found out that WFE02 just forward the queries to WFE01!
i want when i type http:\\wfe01 or http:\\wfe02 to open the portal.
Can you please advise if i need to do any extra step to make it work for me ?
Best Regards.

Tobias Lekman said...

Hi Paolo,

The only reason I know of one server forwarding is because of central admin sites. You can email me the configs if you like and I can have a look ([email protected]).

Anonymous said...

Hi all,

I found one issue with this nice script,
if you are running it on a german OS (and I think this will apply to any installation where the local administrators group is not named 'administrators') you´ll get errors coming from AutoSPInstallerFunction.ps1 whenever 'administrators' is referenced, because this group simply ist named different (administratoren in this case).

Otherwise, nice script.

Markus Feldmann

PBN said...

Hi,
I am deploying the SharePoint 2010 on a 2WFE, 2APP, 2SQL & 1 Reporting Service Server Farm. WFE and APP servers are in the DMZ and using ADFS v2.0 for the authentication into DMZ. Please let me know the changes or additions to the script that's required to achive this.
Thanks

Tobias Lekman said...

Hi PBN,

I have not tried using the script with ADFS v2, please submit this to the codeplex site on http://autospinstaller.codeplex.com/discussions.

Anonymous said...

Greetings,

Unsure if this is the location I should post for troubleshooting. Please forgive me if this isn't, I'd gladly go to the site/forum that is maintained for it!

I'm using your script to setup the initial farm on one box. When running the script I get as far as the warning displayed below and then it stops. I'm not quite sure what could have gone wrong, seeing I used only different accounts and passwords for the dedicated domain accounts (which validate at the start).

The error, as shown in the log transcript:
- Creating web applications...
- Creating Web App "Portal Home"
New-SPWebApplication : Some or all identity references could not be translated.
At D:\Install\SP2010_AutoSPInstaller\AutoSPInstaller\AutoSPInstallerFunctions.ps1:1540 char:27
+ New-SPWebApplication <<<< -Name $WebAppName -ApplicationPoolA
ccount $account -ApplicationPool $AppPool -DatabaseName $database -HostHeader $
HostHeader -Url $url -Port $port -SecureSocketsLayer:$UseSSL | Out-Null
+ CategoryInfo : InvalidData: (Microsoft.Share...PWebApplication:
SPCmdletNewSPWebApplication) [New-SPWebApplication], IdentityNotMappedExce
ption
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPWeb
Application

--------------------------------------------------------------
Script aborted!
- Failed to create web application

Any help would be appriciated!

Thanks in advance.

Tobias Lekman said...

Hi,

Have you removed any of the sections under "ManagedAccounts" from the XML configuration file?

santhosh said...

Hi,
I have updated all the accounts as suggested, when i run the script as admin I get the below error :(, have you experience this issue? any help will be much appreciated.
- Installing Prerequisite Software:
- Running Prerequisite Installer...
- Error:
--------------------------------------------------------------
- Script aborted!
- An unknown error occurred installing prerequisites
-----------------------------------
Thanks,
Santhosh

Tobias Lekman said...

Hi,

I do not know what that specific error is. Please post to the isse tracker for AutoSPInstaller at http://autospinstaller.codeplex.com/workitem/list/basic

Post a Comment

Feel free to add your comment to this post. All comments are moderated and may not appear immediately within the page.