Scope of use: SharePoint Foundation 2010 | SharePoint Server
content of this article
Step 1: Select and pre-configure the operating system
Step 2: Install Prerequisites for SharePoint 2010
Step 3: Install SharePoint 2010
Step 4: Install Visual Studio 2010 and Developer Documentation
Step 5: Create a Hyper-V image from an installed system
When you create or customize a SharePoint solution, it is often best to develop such a solution on a local computer that has Microsoft SharePoint Server 2010 or Microsoft SharePoint Foundation 2010 installed 。 This article describes how to install a development environment that contains Microsoft SharePoint 2010 and Microsoft Visual Studio 2010. The development environment created by following these instructions will not support SharePoint farm installations, and you should not use this configuration to host the active production site. The following instructions allow you to start working in an environment that is particularly suitable for developing SharePoint custom solutions.
To get Windows PowerShell scripts to install and configure all the prerequisites and products that are required to start the development of SharePoint Server 2010, see SharePoint 2010 Easy Install script (the link may point to an English page).
The requirements for the development environment are relatively lax compared to the production environment, and their costs are relatively low, and the guidelines in this topic will not support installation of the production environment. For the local computer on which SharePoint 2010 (for development purposes) will be installed, you have several options when you preconfigure its operating system. The choices you make will be determined by the factors that are specific to your organization and environment, including the budget, the size of your development team, and the operating system you and your organization are already using.
In any development environment, the computers used should have CPUs that support x64 functionality, and at least 2 GB of RAM for installing and running SharePoint Foundation; preferably 4 GB of RAM. To install and run SharePoint Server, you should use a computer with 4 GB of RAM, preferably with 6 GB to 8 GB of RAM.
The specific options are as follows:
Install SharePoint on Windows Server Service Pack 2 x64 (or Windows Server R2 x64).
On a virtual machine that is running Windows Server service Pack 2 x64 (or Windows Server R2 x64) guest operating system, use Microsoft Hyper-V and install SharePoint.
Install SharePoint on Windows 7 x64, Windows Vista Service Pack 1 x64, or Windows Vista Service Pack 2 x64.
On a virtual machine that is running Windows 7 x64, Windows Vista Service Pack 1 x64, or a Windows Vista Service Pack 2 x64 guest operating system, use Microsoft Hyper-V and install Sharepoint.
You must install the WCF hotfixes for Microsoft Windows. This hotfix applies to Windows Server Service Pack 2, Windows Vista Service Pack 1, and Windows Vista Service Pack 2, as well as Windows Server R2 and Windows 7.
If you are using Windows Vista Service Pack 1 or Windows Vista Service Pack 2, install the hotfix (KB967535) for ASP. NET on IIS 7.0. This hotfix is installed on Windows 7, Windows Server Service Pack 2, and Windows Server R2, and it updates the ASP. NET Common Language Runtime (CLR) to identify new compilation optimization options. To take advantage of this option, set the Optimizecompilations property of the <compilation> tag to true in the Web. config file:
<compilation optimizecompilations= "true" >
By making this change, the initial page load time will be significantly shortened when you install the solution to the bin directory.
The. NET Framework 3.5 SP1 must be installed in order to enable REST-based data services. This update applies to Windows Server Service Pack 2, Windows Vista Service Pack 1, and Windows Vista Service Pack 2, as well as Windows Server 20 R2 and Windows 7.
You cannot use Windows 7 and Windows Vista to make a production deployment of SharePoint 2010. If you use Windows 7 or Windows Vista in your development environment, you should be able to use a test environment that has the same operating system installed as your production environment. It is recommended that you use Windows 7 and Windows Vista only on developer workstations, and that they should only be used for stand-alone installations. You can use a separate instance of Microsoft SQL Server, but you should not configure the installation as a SharePoint farm, and you should not host the active Web site on this configuration.Step 2: Install Prerequisites for SharePoint 2010
Before you begin the installation, SharePoint requires that you have certain prerequisites installed on your operating system. For this reason, SharePoint includes a PrerequisiteInstaller.exe tool that installs all of these prerequisites for you. If you set up a developer workstation by using Windows Server Service Pack 2 or the Windows Server R2 operating system, you can only run SharePoint 201 first in order to install SharePoint 2010 0 The PrerequisiteInstaller.exe tool is included to install the prerequisites that are required for SharePoint before you run Setup.exe. However, you cannot use PrerequisiteInstaller.exe on Windows 7 or Windows Vista. For these operating systems, you must follow the other instructions in this section.
Because the default installation is only valid for Windows Server 2008, you must edit a configuration file and manually install many prerequisites. You must be logged on with an account that has administrator access on the local computer, and then perform each of the following steps. These steps assume that you obtained SharePoint 2010 distribution media that has been compressed to an executable file (for SharePoint Foundation 2010 named SharePointFoundation.exe, for SharePoint Server 2010 is named Setup.exe).
Set up developer workstations
Copy the SharePointFoundation.exe (or Setup.exe) installation files to a folder on the computer where you installed SharePoint and do development work, for example, in the following path:
Unzip the installation file by opening a command Prompt window, and then typing the following command in the directory location of the folder where you copied the installation files in the previous step.
For SharePoint Foundation 2010:
For SharePoint Server 2010:
Use a text editor, such as Notepad, to open the installation configuration file located in the following path. config:c:\SharePointFiles\files\Setup\config.xml
Add the following lines within the <configuration> tag:Xml
<setting id= "Allowwindowsclientinstall" value= "True"/>
Save the configuration file.
To view the complete configuration file. For SharePoint Foundation 2010, this configuration file now resembles the following. For SharePoint Server 2010, the full profile will be longer (so the following text cannot replace the contents of the file), but the same allowwindowsclientinstall property settings should be used.xml
<Configuration> <Package Id="sts"> <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" /> </Package> <DATADIR Value="%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14\Data" /> <Logging Type="verbose" Path="%temp%" Template="Microsoft Windows SharePoint Services 4.0 Setup *.log" /> <PIDKEY Value="PIDKey Value" /> <Setting Id="UsingUIInstallMode" Value="1" /> <Setting Id="SETUP_REBOOT" Value="Never" /> <Setting Id="AllowWindowsClientInstall" Value="True"/> </Configuration>
All text in this configuration file is case-sensitive. If you did not edit this profile as described in the previous step, or if you did not save this profile, you will see the error message shown in Figure 1 when you try to run the installation.Figure 1. Error message that Setup cannot continue
If you are using Windows Vista Service Pack 1 or Windows Vista Service Pack 2, you must install the following prerequisites:
. NET Framework 3.5 SP1
Windows PowerShell 2.0
Windows Installer 4.5 Redistributable
If you are using Windows Vista Service Pack 1, Windows Vista Service Pack 2, or Windows 7, install the following additional prerequisites:
Microsoft Filterpack 2.0. At the command prompt, type the following:
Microsoft Sync Framework (the link may point to an English page)
SQL Server Native Client
Description of the Windows Identity Foundation (WINDOWS6.1-KB974405-X64.MSU)
Chart Controls (this link may point to an English page) (you do not need to install this component if you plan to install SharePoint Foundation 2010).
SQL Server Analysis SERVICES-ADOMD. Net (this link may point to an English page) (you do not need to install this component if you plan to install SharePoint Foundation 2010)
Manually enable each of the Windows features that you want. You can do this quickly by copying the following command and running this command in a command prompt window.
The following text contains a line break. You must remove the line break to run this script from the command prompt.
start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures; IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors; IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility; IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics; IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools; IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication; IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic; IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility; IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel; WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation; WCF-NonHTTP-Activation
Depicts a Windows Features dialog box on a computer running the Windows 7 operating system. For easy reading, the graphics have been divided into two. You will see the same list of Windows features on Windows Vista.
Figure 3. The second part of Windows features list in Windows 7
When the installation is complete, a link to the log file will also appear.
Install SQL Server KB 970315 x64.
After you complete the installation of Microsoft SQL Server KB 970315 x64, complete this wizard.
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\bin\psconfigui.exe
If you use a computer that is joined to a domain but is not connected to a domain controller, the SharePoint products and Technologies Configuration Wizard may fail. If this error occurs, connect to the domain controller either directly or through a virtual private network (VPN) connection, or log on by using a local account that has administrative privileges on the computer.
After you complete this configuration wizard, you will see the new SharePoint site.
Install Visual Studio 2010.
Download and install the Microsoft SharePoint SDK (the link may point to an English page).
After you have set up an available development environment on the physical host computer, you can save your settings as a virtual machine so that others can use it, or you can reuse this "clean" installation later. Alternatively, you can set up the development environment on the newly created virtual machine. Hyper-V in Windows Server Service Pack 2 (the link may point to an English page) provides the infrastructure and management tools that enable you to create a multi-server environment on a single host. For more information, see Getting started with Hyper-V: Walkthroughs from initial setup to common scenarios (the link may point to an English page). To obtain a practical Windows PowerShell script that lets you create a virtual hard disk drive (VHD) from an existing Windows Server 2008 image, see the install-windowsimage on the MSDN Code Gallery PowerShell script (the link may point to an English page).
If you use Windows 7, you can also create a VHD in Windows Hyper-V to install SharePoint, and then use BDCEdit.exe to configure Windows 7 so that it boots directly to the operating system on that VHD. This can improve performance because there is no virtualization layer. It also allows you to use VHD differencing disks, which are VHDs that contain only elements that are different from a single basic installation, that save disk space and make it easier to roll back changes. For more information about such configurations, see Deploying Windows on a virtual hard disk that has native boot.
If you choose to create a single-server installation on a virtual machine, the standard memory requirements still apply. Virtual machines require at least 2 GB (preferably 4 GB) of RAM. Virtualization also allows you to create a server farm that consists of multiple computers. In a farm installation of SharePoint Server 2010, each computer requires at least 1.5 GB (preferably 2 GB) of RAM. You can run a fully functional domain infrastructure on the following example installation:
Two virtual machines, each with 2 GB of RAM
Domain controllers and Microsoft SQL Server 2008 that are running on a single computer
SharePoint Server 2010 and two WEB applications (including central Administration) that are running on another computer
Setting up the SharePoint 2010 development environment on Windows Vista, Windows 7, and Windows Server 2008