Wednesday, October 13, 2010

How to set up basic SharePoint 2010 environment for enterprise

A quick search brings Installing SharePoint 2010 on Windows 2008 Server R2 and Deployment overview (SharePoint Server 2010) to us.  They are both splendid, shows us all details. However, is there a "simplified" version of the installation guide?

Based on the past three years experience on SharePoint installation, development, deployment and maintenance, I wrote a two-page installation guide, which meets the most basic rules, such as "don't use local built-in account as service account", "SQL and SharePoint need to be installed on separate servers", etc.  These rules can save a lot of trouble in the future.

This guide is for network administrators and SharePoint junior developers.

1.    Create five domain user accounts

They are all normal domain user accounts, but two user accounts need to join local admin usergroup of SharePoint server and SQL server except the test accounts.

The name could be:

Domain\svcSQL, join windows local admin of the SQL Server;
Domain\svcSharePoint, join dbcreator and securityadmin role of the SQL Server; join windows local admin of the SharePoint;
Domain\adminSharePoint
, join windows local admin of the SharePoint and SQL Server; db_owner of content databases (to backup or restore site collection);
Domain\testSharePoint1, join SharePoint viewers user group;
Domain\testSharePoint2, join SharePoint contributors user group;

Domain\svcSharePoint should have the "Replicating Directory Changes" Permission in the active directory, so can read user information from active directly;
Logon as Domain\adminSharePoint to install all software.

In high secure environment, we need to create more service accounts. Such as one for search scrawling, one for user profile synchronization, one for each web application pool, etc.  And of course, we should not join any user account to the local windows Admin group of the SQL server box.

update at 12/04/2011:
If you want set up a "better" SharePoint farm, you need at least three more service accounts.


Domain\svcSharePointApp, service account of web application;
Domain\svcSharePointCrawler, service account to crawl data, read only rights for search application service;
Domain\svcSharePointADsync, service account to import user information from active directly;

2.    Confirm the environment

Such as exchange server name and IP, domain controller server name, firewall settings, internet access web proxy settings.


Exchange server is for incoming and outgoing email settings of the SharePoint server.  If no email will be used by SharePoint, please ignore this step.

3.    Setup CD

Windows 2008 x64
SharePoint 2010
SQL Server 2008 x64 ( with sp2. R2 is better)
Visual Studio 2010 (optional)
Office 2010 x86 (optional)
SharePoint designer 2010 x86 (free. optional)
Visio 2010 x86 and InfoPath 2010 x86 (if not included in Office 2010. optional)

4.    Two virtual machines with windows 2008

ESX or HyperV.

One for SharePoint 2010, one for SQL Server 2008.

Activate the OS and then install all windows patches.

Join them to local domain.

Configure network settings.

Make sure port number 80, 443 is opened on firewall of the SharePoint server.
Make sure port number 1433 is opened on firewall of the SQL server.

In the future, we can add more servers into the farm easily.

5.    Enable IIS and Application server role on SharePoint server

 Need to enable all IIS 6 features.

6.    Install SQL Server 2008 on the virtual machine

Normally need huge disk space for database files. At least 100GB.
Add user account Domain\adminSharePoint to SQL user role sysadmin.

Don't forget to install SQL 2008 sp2 for SQL 2008 R1.
Disable and stop unnecessary windows services, such as SSAS, SSIS and SSRS if don't need them.
Change the SharePoint relevant databases' recovery mode from "Full" to "Simple".

7.    Install SharePoint Designer 2010 on SharePoint server

Optional.

8.   One workstation for test and development

Optional.

Need 8GB ram to run as development workstation. Minimum 6GB ram.

If the RAM is less than 6GB, it can only be used as test workstation.

Need windows 2008 OS for development environment.

This one also need to join the local domain.

Add Domain\adminSharePoint to local admin user group.

Add Domain\testSharePoint1 and Domain\testSharePoint2 to local user group.

Install Office 2010 all components (optional).
Install SharePoint Designer 2010 (recommended, optional).

9.    Install SQL Server 2008 on Development workstation

Add Domain\adminSharePoint and Domain\svcSharePoint to sysadmin SQL user role.

10.    Install SharePoint 2010 on SharePoint server

Always choose "Server Farm" and "Complete".
Give Central Admin a simple port number (such as 9000) instead of the default random one.

11.    Configure SharePoint 2010

Enable the service applications needed. Such as "search", "user profile", etc.

Give web application IIS site and database a better name, such as "SharePoint - 82 - IT" and "WSS_Content_82_IT".

12.    Prepare the scripts to backup and restore SharePoint site collection.

These script need to run "as administrator" and "farm administrator", also need SQL database access rights.

May schedule the script through windows scheduler to backup data everyday.


----------below is for site collection backup----------


@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\14\bin\stsadm"
@SET FILENAME=%date:~10,4%%date:~7,2%%date:~4,2%-%time:~0,2%%time:~3,2%%time:~6,2%

cd C:\SharePoint\Scripts
c:

%STSADM% -o backup -url http://SharePointServerName:port -filename ".\SharePointServerName.IT.82.%FILENAME%.dat" -overwrite

pause


----------below is for site collection restore-----------















@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\14\bin\stsadm"

cd C:\SharePoint\Scripts
c:

%STSADM% -o restore -url http://SharePointServerName:port -filename ".\SharePointServerName.IT.82.20100308-150750.dat" -overwrite

%STSADM% -o siteowner -url http://SharePointServerName:port -ownerlogin domain\adminSharePoint

pause

No comments:

Post a Comment