Developers often need to set up “playground” development environments where they have full privileges to manipulate stuff. Here, I summarize the steps for setting up a SharePoint development virtual machine (VM). These steps apply to on-premise installations of both SharePoint 2010 and 2013.
I write this partly as a reference. So I will only include the details I consider relevant. This is not a generic installation tutorial. I assume that you are already familiar with installing software like Windows operating system, Visual Studio, and SQL Server. Just watch out for the finer details specific to setting up a standalone SharePoint box (like promoting a machine to a domain controller, creating specific Active Directory users for SharePoint, how to do an automated script based install of SharePoint Server, etc).
I also assumed that you are familiar with virtualization software like VMware and VirtualBox. Here, we will be working with VirtualBox.
I have written quite a bit about VirtualBox and Virtualization. So if VirtualBox is new to you, then you should definitely check out my VirtualBox tutorials. If you need to hit the ground running real quick with VirtualBox, then use this specific tutorial: Install VirtualBox And Create A Virtual Machine.
Recommended Software For A SharePoint 2010 Box
If you’re setting up a SharePoint 2010 machine, then I recommend:
- Windows Server 2008 R2 (I use the Datacenter version).
- Visual Studio 2010 (I use the Ultimate version).
- SQL Server 2008 R2 (I use the Enterprise version).
- SharePoint Server 2010 (Note: This is different from SharePoint Foundation 2010. The “Server” version is the full version with more features).
Depending on your needs, the versions (Datacenter, Ultimate, etc) may not really matter. I’m just really paranoid about getting the greatest of any software tool 🙂
Any installation screenshots (for setting up a SharePoint 2010 box) shown here will be using those versions.
You should also ensure that you get the latest service packs for each software package. At the time of this writing, the latest service pack for SharePoint Server 2010 is service pack 2.
In some cases, you might get these via Windows updates, however, I noticed that you have to manually grab Service Pack 2 for SharePoint Server 2010. Not available with Windows updates.
Recommended Software For A SharePoint 2013 Box
Again, the versions may not really matter. But here’s what I will be working with:
- Windows Server 2012 (I use the Datacenter version).
- Visual Studio 2012 (I use the Ultimate version).
- SQL Server 2012 (I use the Enterprise version).
- SharePoint Server 2013 (Again, this is different from SharePoint Foundation 2013).
Any installation screenshots (for setting up a SharePoint 2013 box) shown here will be using those versions.
Make sure you have all ISOs (or setup packages) and keys ready and then start by installing Windows.
Install Windows For SharePoint
Since the machine we’ll be working with will reside in VirtualBox, use this tutorial to complete your Windows OS installation in VirtualBox. Although I wrote it for Windows Server 2012, it applies directly to Windows Server 2008 as well. Just select the appropriate Windows version when asked.
After completing the OS installation and activating Windows, perform some miscellaneous stuff like:
- Disable Internet Explorer Enhanced Security Configuration.
- Prevent the Initial Configuration Wizard from displaying at startup.
- Install Windows Updates.
- Etc etc.
Not necessary. Just cool server setup stuff.
Grab a Virtual Machine snapshot at this point. Snapshots are a really cool feature of VMs because they allow reverting between machine states without hassle. This comes in really handy when something goes wrong or when we just need to do a quick test. Although we will not be using the snapshots here, I will mention recommended stages at which taking a snapshot could be useful.
We will now install Visual Studio.
Install Visual Studio
The Visual Studio install process is very straightforward and similar for both Visual Studio 2010 and Visual Studio 2012. Just load the ISO image (or setup package) and double-click the setup file and follow the installation prompts. It usually takes a while to complete.
After the install, update the Visual Studio help libraries over the internet (if you like) and then perform a full Windows update.
Grab another virtual machine snapshot at this point.
Add Roles, Features And Services.
Step 1: Use a meaningful computer name.
Go to “My Computer” properties. Under “Computer name, domain and workgroup settings” press “Change settings”. The System Properties window will open. Press “Change” and change the computer name to something meaningful like DEVMACHINE. Ignore the workgroup setting and press OK. Here’s a screenshot of the process from Windows Server 2012. The screens are very similar for Windows Server 2008.
You will need to restart the machine for the name change to take effect.
Step 2: Add the Application Server role and some role services.
Open Server Manager. If working with SharePoint 2010, go to the Roles section and press Add Roles. For SharePoint 2013, press Add roles and features on the Server Manager dashboard. In both cases, the Add Roles (and Features) Wizard will open. Click through till you get the Select Server Roles screen and select the Application Server role.
If asked to “Add features required for Application Server?” (You will likely get this pop up if working with SharePoint 2010) just go ahead and press Add Required Features. Click Next till you get the Select Role Services screen and select the following role services:
- .Net Framework (Select whatever version is shown. It will probably be selected by default)
- Web Server (IIS) Support
- TCP Port Sharing
- HTTP Activation
- TCP Activation
- Named Pipes Activation
Always add required features if/when asked.
Here’s a screenshot of how this looks in Windows Server 2008. The screen is similar for Windows Server 2012. As expected, the .NET Framework versions will be different.
Press Next through the confirmation windows then press Install.
Let’s now install Active Directory Domain Services (ADDS) in order to promote your machine to a Domain Controller.
Promote Your Machine To A Domain Controller.
Step 1: Add Active Directory Domain Services (AD DS).
Open Server Manager. If working with SharePoint 2010, go to the Roles section and press Add Roles. For SharePoint 2013, press Add roles and features on the Server Manager dashboard. In both cases, the Add Roles (and Features) Wizard will open. Click through till you get the Select Server Roles screen and select the Active Directory Domain Services role. You may be asked to “Add features that are required for Active Directory Domain Services?” – Just press Add Features.
Note: For those familiar with the “DCPROMO” command in Windows Server 2008, this command no longer works in Windows Server 2012. You will need to use the method described above to install AD DS.
Here are screenshots of how this looks in Windows Server 2012. The screens are very similar for Windows Server 2008.
Click Next as required and then click Install.
Now we need to actually promote the machine to a domain controller after adding the AD DS role.
Step 2: Promote Your Machine To A Domain Controller.
After installing AD DS, you will see a link in the wizard to immediately promote your machine to a domain controller. See the screenshot below (Windows Server 2008). Notice the link to Close this wizard and lauch the Active Directory Domain Services Installation Wizard (dcpromo.exe). Click it. The process of promoting to a domain controller will begin.
For Windows Server 2012, the corresponding link will be called “Promote this server to a domain controller”.
For Windows Server 2012, In the Deployment Configuration options, select Add a new forest and enter a fully qualified domain name (FQDN) like DEVDOMAIN.com. For Windows Server 2008, you will need to click next through a couple of screens before you see the deployment configurations options screen. When you see the screen, select Create a new domain in a new forest. Again enter your desired FQDN.
Leave the default Forest funtional level and/or Domain functional level or change as desired. Defaults are fine for me.
For Windows Server 2012, enter a password for Directory Services Restore Mode (DSRM). This password is also required for Windows Server 2008 but at a later point in the installation process. Actually, for both operating systems, the configurations needed to set up a domain controller are very similar. But the sequence of options differ a little. I will not bother explaining the sequence in detail.
On both Windows Server 2012 and 2008, you will likely encounter a warning message like this:
A delegation for this DNS server cannot be created because the authoritative parent zone cannot be found or it does not run Windows DNS server. If you are integrating with an existing DNS infrastructure, you should manually create a delegation to this DNS server in the parent zone to ensure reliable name resolution from outside the domain “DEVDOMAIN.com”. Otherwise, no action is required.
Screenshot from Windows Server 2012.
Since we’re only setting up a standalone development VM, you can ignore this message.
On Windows Server 2008, you will likely encounter this message:
This computer has at least one physical network adapter that does not have static IP address(es) assigned to its IP Properties. If both IPv4 and IPv6 are enabled for a network adapter, both IPv4 and IPv6 static IP addresses should be assigned to both IPv4 and IPv6 Properties of the physical network adapter. Such static IP address(es) assignment should be done to all the physical network adapters for reliable Domain Name System (DNS) operation.
Again, since we’re only setting up a standalone development VM, you can ignore this message. Press Yes to use the automatically assigned IP.
Leave the default NetBIOS domain name. Click “Next” as required through the screens. On the Summary/Prerequisites screen, click Next/Install. Your computer will be restarted in the process.
Recommendation: Since you just completed a major installation, it would be nice to take a VM snapshot at this point before proceeding.
At this point, I also like to change the password policy for the domain so I don’t keep getting annoying password expiry prompts. Here’s how I do it…
Change Password Policy on Windows Server 2008 and 2012 Domain Controllers
To change the password policy on either Windows Server 2008 or 2012, you need to start Group Policy Management Console (GPMC).
Press the Windows logo key + R to open the RUN dialog box. Type gpmc.msc in the text box, and then click OK or press ENTER. This will bring up the Group Policy Management Console.
Expand the local forest that you want to modify the password policy for. Expand Domains, and the domain that you wish to modify. Right click on Default Domain Policy and click edit. This will bring up a new screen. Navigate to Computer Configuration >> Policies >> Windows Settings >> Security Settings >> Account Policies >> Password Policy. From this screen, you will be able to modify the password policy. Here’s a screenshot from Windows Server 2012.
To make the new password policy take effect, you can either reboot or run the command: gpupdate /force from the command prompt.
We will now install SQL Server for SharePoint.
Installing SQL Server For SharePoint
As I mentioned earlier, this is not a generic installation tutorial. I assume that you are already familiar with installing Windows software. So I’m only including the details I consider relevant. Just watch out for the SharePoint specific tweaks.
Before we install SQL Server, first create a domain user account for SQL Server services (Account name = sqlacct). Choose a password. If you only need this machine for personal development and testing purposes, it is okay to use the same password everywhere.
Next add the following domain user accounts (to be used for SharePoint):
Again, depending on your needs, it may be fine to use the same password everywhere.
To install SQL Server on your VM, load up the SQL Server Installation wizard using your ISO or setup package. Observe the regular protocols like installing prerequisites, entering product key, etc. At some point, you might need to temporarily disable Windows Firewall.
When you get to the Feature Selection screen, ensure that “Full-Text Search” (SQL Server 2008 R2) or “Full-Text and Semantic Extractions for Search” (SQL Server 2012) is NOT selected. All other features may be selected.
SQL Server Full-Text Search is not needed because SharePoint has it’s own search index that does not rely on this feature of SQL Server. I’m not sure if leaving it selected will break anything afterwards (I actually doubt this)… But there’s this thing with developers and redundancy 🙂
Just uncheck it.
When asked to either install a Default instance or a Named instance, choose Default instance.
When you get to the Server Configuration screen, you need to specify the service account(s) to be used for each SQL Server service. Although Microsoft recommends using a separate account for each SQL Service, I just simply use the domain user account I created earlier specifically for this purpose (sqlacct). I haven’t had any issues with this so far.
Here’s a screenshot from SQL Server 2012. Very similar for SQL Server 2008 R2.
When asked to choose an authentication mode, select Mixed Mode (SQL Server authentication and Windows authentication) then enter a password for the SQL Server system administrator (sa) account.
Within the boxes to Specify SQL Server Administrators and Analysis Services Administrators, I usually just add the current user. This is usually the default system administrator.
For SQL Server 2012, you might also be asked to specify a user for the Distributed Replay Controller service. Again the default system administrator is fine.
Click through the next screens and begin the installation.
When the installation completes, open the SQL Server Configuration Manager and use the SQL Server Network Configuration area to enable (or confirm) the following connection protocols on the just installed SQL Server instance:
- Named Pipes Enabled
- TCP/IP Enabled (will probably be enabled by default)
At the time of this post, the latest service pack for SQL Server 2008 R2 is Service Pack 2. Make sure you upgrade if required.
If you turned off Windows Firewall during the installation process, you may now turn it back on.
Recommendation: Take another virtual machine snapshot at this point.
We are now ready for the actual SharePoint installation.
Script Based Installation of SharePoint Server: AutoSPInstaller
The process of installing and configuring a full SharePoint Server normally requires a significant amount of administrative effort involving installers, Central Admin, PowerShell and the SharePoint Initial Configuration Wizard.
We will by-pass all that hassle by using a popular codeplex project (AutoSPInstaller) to automate installation process. AutoSPInstaller consists of PowerShell scripts, an XML input file, and a standard windows batch file (to kick off the process) which together provide a quick and near-unattended installation and initial configuration (Service Apps, My Sites etc) of Microsoft SharePoint Server 2010/2013.
Download the latest version of AutoSPInstaller from the codeplex page (I used version 3.87). Extract the contents to a location on your virtual machine.
At the time of this post, you will find 3 subfolders within the main (SP) folder:
- 2013 and
The 2010 and 2013 folders both contain a “SharePoint” folder into which you will copy and paste the contents of your installation media. If you’re only installing one version, you can leave the other folder as is.
Browse through the folder structure. You will find it very self-explanatory.
Within the AutoSPInstaller folder, you will find a bunch of files. The only one you need to modify is AutoSPInstallerInput.xml
This heavily commented file contains all the configuration options you need to define. Read through it carefully and configure as appropriate. Some of the values you need to specify include SPVersion (2010 or 2013), your PID key and a matching SKU (Standard or Enterprise) and so much more.
While you might want to be very careful about the correctness of the values you enter, there’s no need overkilling it. One beautiful feature of AutoSPInstaller is, if you get some configuration wrong, the installation terminates with a descriptive error message and allows you to correct the error after which it picks up from where it left off!
When asked to provide SharePoint service accounts, use the corresponding domain user accounts we created earlier in this tutorial.
When you complete the configuration changes to the AutoSPInstallerInput.xml file, save the file and start the installation by running the windows batch file (AutoSPInstallerLaunch). The installation will take a while and you get to do almost nothing.
Here’s a screenshot of part of the process.
Install Visual Studio Tools For Office
If you’re working with Visual Studio 2010 (and SharePoint Server 2010), you’re good to go at this point. You can immediately start developing for SharePoint 2010. However, for Visual Studio 2012 (and SharePoint Server 2013), the SharePoint project templates will not be available in Visual Studio yet. One more installation is required.
Download and install Visual Stuio Tools for Office Runtime from here. The installation is a straightforward process and once complete, you can fire up Visual Studio and start creating projects for SharePoint 2013.