Building a Windows Server 2008 MOSS Virtual Machine

Posted Tuesday, April 7, 2009 2:40 PM by CoreyRoth

I get asked a lot about what I put into a MOSS virtual machine, so the last time I built one, I actually took the time to document each thing I did and the order in which I did it.  Getting a MOSS virtual machine just right can take some work.  This is actually the third one I have built in this environment and I am finally pretty happy with it.  Ultimately, the image will contain Windows Server 2008, SQL Server 2008, Active Directory, MOSS 2007 (Kerberos enabled with SP1 and Infrastructure Update), and Office 2007.

Virtualization

With my latest image, I went with Microsoft Virtual PC.  I don’t have VMWare workstation, so this is what I am stuck with.  It may not have the features that VMWare does but ultimately it still gets the job done.  This unfortunately limits me to 32 bit, but at this time that is not a deal breaker for me.  As for memory allocation, 1 GB is probably the absolute minimum you can get away with.  2 GB or more is better.

Windows Server 2008

For some reason, I keep seeing people build virtual machines with Windows Server 2003.  That operating system is six years old.  It’s time to upgrade.  Windows Server 2008 comes with IIS7 and works great with MOSS 2007.  The edition I usually go with is Data Center edition.  You can use Standard or Enterprise as well, but avoid Web since you are going to want to be able to promote the server to be a domain controller.  There aren’t many options in the install of Windows Server, so just install it as is and it can be configured once it is done.

Once Windows Server is installed, there are a number of things you should do before even considering installing software.  The first thing I always do is set the time zone.  You don’t want your server thinking it’s on the west coast when it is really on the east.  The next thing you want to do is set the computer name.  You can do this right from the Server Manager screen that pops up every time you login.  Set your server name to something meaningful and reboot it.  I usually go with a name of something like moss-server.

Virtual Machine Addons

Whatever, virtualization platform you choose, be sure and install the addons, so that things like the mouse work right and the time gets synchornized with the host computer

Windows Server 2008 Roles

Once you reboot, you will need to use the Server Manager to configure a few things about your server.  First, you are going to want to install the DNS Server role.  This is necessary for Active Directory.  When you promote your domain controller, it might actually install this service for you now, but this is the way I have done it since Windows 2000 Server.  It will complain that your IP address is being assigned via DHCP.  Just ignore the warning and continue anyway.

The next role, you need to install is the Web Server role since SharePoint obviously requires IIS.  When you select this role, a number of role service options get checked automatically but there are a few extras that you will want.  Specifically, make sure that ASP.NET, Basic Authentication, Windows Authentication, and Digest Authentication are all checked.

Active Directory

I prefer to install MOSS on a server that has Active Directory.  If you are in an environment, where you want to attach to an existing active directory you can skip this step (as well the DNS role from earlier).  However as a consultant, many times, I want my MOSS server to be independent of any organization’s directory for my own testing purposes.  For those of you who are new to creating domain controllers, dcpromo.exe, is what you run to start that process.  It should install the necessary Active Directory Directory Services role that you will need.  It will again complain about not having a static IP address.  Ignore it and continue.  You should be able to use the default options.  I think I usually use the Windows Server 2003 compatibility level, but it shouldn’t really matter for SharePoint development.  As for a name of the domain, I usually go with something like MOSSTEST.  You can set it to whatever you want, but for the purposes of this post, MOSSTEST (NT4 name) and mosstest.local (Active Directory name) will be used.

Network Accounts

Now, that Active Directory is installed, you will want to create several accounts that will be used for the services and installation of MOSS.  I recommend using the same password for each (since this is for a development virtual machine).  I also recommend storing your password in a text file with the rest of your virtual hard disk files on the host file system since I have forgotten the password to a VM more than once.  Here is a list of the accounts that I typically use.

Network Account

Description

MOSS_Setup

Administrator account used to install MOSS.
SQL_Service Service account for SQL Server
MOSS_AP_CentralAdmin Application Pool account for Central Administration
MOSS_AP_SSP Application Pool account for the Shared Services Provider
MOSS_AP_Portal Application Pool account for the Port 80 site
MOSS_SSP Shared Services Provider account
MOSS_WSS_Search SharePoint Search Service
MOSS_Search MOSS Search Service
MOSS_Crawl Enterprise Search Default Content Access Account

All accounts except for MOSS_Setup are just regular user accounts.  The setup account you will use for the installation of MOSS and requires administrator permissions.  You can of course name these accounts anything you want.  This is just a guideline for some suggested names.

SQL Server 2008

The next step is to install SQL Server 2008.   Use the SQL_Service account when prompted for any service accounts.  I typically try to keep the installation small and only install SQL Server and the tools.  If you think you might use Analysis Services or Reporting Services, feel free to install those as well, but chances are you won’t need them.  Use default settings for everything else in the install.  Also note, that this will install .NET Framework 3.5 for you.

Slipstream Service Pack 1 and the Infrastructure Update

Installing MOSS 2007 on Windows Server 2008 requires you to slipstream SP1 into the install media.  This requires you to extact the installation contents of the CD (or ISO image) into a folder.  You then extract the contents of the SP1 installer into the Updates subfolder.  I also recommend you do the same procedure for the Infrastructure Update.  Emmanuel Bergerat has an excellent post on how to do this.

Install MOSS 2007

Once you have completed the slipstream process, it is time to begin the installation of MOSS.  I typically don’t use the administrator account to do this but instead use another account with administrator privileges.  In this case I am using the MOSS_Setup account.  You will want to do an Advanced Install with a Complete installation.

When the install is complete, the Configuration Wizard will start and you will have a few more options to set.  Choose the Create a New Farm setting and then use the settings below as guidelines.  You can use whatever database name or port number you want, but here is what I have used in the past.

Setting Value
Database Server .
Database Name SharePoint_Config
Service Account MOSSTEST\MOSS_AP_CentralAdmin
SharePoint Central Admin Port Number 8100
Security Settings Negotiate (Kerberos)
Configuring Kerberos on the Central Administration Site

At this point, if you try to visit the Central Administration site and login, you aren’t going to get very far.  This is because Kerberos has been enabled but not configured on the domain.  Martin Kearn has an excellent post on the setspn.exe commands you need to run to enable kerberos.  At this time, you will want to follow all of the  steps in that post that apply to Central Administration.  After you can access Central Administration, you will follow the steps in the post to apply kerberos to the SSP and the web application you create on port 80.  If you don’t feel the need to use kerberos on your Virtual Machine, you can always just use NTLM and skip these steps.

Windows SharePoint Services Search

Once Central Administration is up and running, go to Services on Server, and click start on Windows SharePoint Services Search.  The default settings should be used unless otherwise noted.

Setting Value
Service Account MOSSTEST\MOSS_WSS_Search
Content Access Account MOSSTEST\MOSS_Crawl

Search Database Server

.
Search Database Name WSS_Search_moss-server
Search Database Authentication Windows
Office SharePoint Server Search

You will then need to start the Office SharePoint Server Search service from the Services on Server page.  When you finish this, go ahead and start the other services using the default settings.

Setting Value

Use this server for indexing content

Checked
Use this server for serving search queries Checked
Contact E-mail <any e-mail address>
Service Account MOSSTEST\MOSS_Search

Indexer Performance

Partly Reduced
Search Database Name WSS_Search_moss-server
Creating the Web Application for the Shared Services Provider

When dealing with a new install, I find it best to go ahead and configure the Web Applications for both the SSP and the main web site (usually on port 80).  Here are the settings I usually use.

Setting Value
Port 8101
Path C:\Inetpub\wwwroot\wss\VirtualDirectories\8101
Authentication Kerberos
Load Balanced URL http://moss-test:8101
Application Pool SharePoint SSP
Application Pool Account MOSSTEST\MOSS_AP_SSP
Restart IIS Restart IIS Manually
Database Server .
Database Name WSS_Content_SSP
Database Authentication Windows
Creating the Web Application for the Portal Site (Port 80)

You now need to create a web application for the main SharePoint site (usually hosted on port 80).  Be sure and configure Kerberos if you enabled it on this site as well as the SSP.

Setting Value
Port 80
Path C:\Inetpub\wwwroot\wss\VirtualDirectories\80
Authentication Kerberos
Load Balanced URL http://moss-test:80
Application Pool SharePoint - 80
Application Pool Account MOSSTEST\MOSS_AP_Portal
Restart IIS Restart IIS Manually
Database Server .
Database Name WSS_Content_80
Database Authentication Windows
Shared Services Provider

The next step will be to configure a Shared Services Provider (SSP).  Since you have already created the needed web applications, it simplifies this step quite a bit.

Setting Value
SSP Name SharedServices1
Web Application SharePoint – SSP (Created on port 8101 above)
My Site Web Application SharePoint - 80
My Site Relative URL /MySites (Some may prefer to put this on its own web application)

SSP Service Account

MOSSTEST\MOSS_SSP
SSP Database Server .
SSP Database SharedServices1_DB
SSP Database Authentication Windows
Search Database Server .
Search Database Name SharedServices1_Search
Search Database Authentication Windows
Index Server MOSS-SERVER
Index Path C:\Program Files\Microsoft Office Servers\12.0\Data\Office\Applications

SSL for Web Services

No
Site Collection

At this point you’ll need to create a Site Collection on your port 80 site.  Use any site template you prefer.  You may want to also set up some other accounts as site collection administrators besides just MOSS_Setup.

Internet Explorer

At this point, your SharePoint Server should be operational.  However, there are a few more settings to make as well as some additional applications you might want to install for development.  You will want to configure Internet Explorer, so that you don’t have to type your credentials every time you open a SharePoint site.  To do this, go to Tools –> Internet Options –> Security.  From here, scroll to the bottom and choose Automatic login with current user name and password.  More information in this post.

Visual Studio 2008

At this point, you are ready to start installing developer tools.  Don’t even think of using Visual Studio 2005.  Install Visual Studio 2008, using whichever options you like and then be sure and install Service Pack 1.  If you are connecting to a TFS server, be sure and install TFS explorer as well.  Once everything is installed, you can install some of the SharePoint tools if you so choose.  Popular ones are VSeWSS 1.3, WSPBuilder, and Stsdev.

Microsoft Office 2007

If you plan on doing any ECM development, then I recommend installing Office.  Otherwise, you may not need to worry about it.  Do a custom install and just choose the pieces you think you might need (i.e.: Word, Excel, PowerPoint, Publisher, etc.). 

SharePoint Designer 2007

If you read any blog at all, you know that SharePoint Designer 2007 is now free, so go ahead and install it.  Occasionally, it has some use.

SharePoint Features

I tend to activate a few builtin MOSS features such as publishing.   Here are the Site Collection Features I usually activate.

Feature Notes
Office SharePoint Server Enterprise Site Collection features  
Office SharePoint Server Pubishing Infastructure Activate by using stsadm -o activatefeature -name publishingresources -url <server>
Office SharePoint Server Search Server Web Parts  
Office SharePoint Server Standard Site Collection Features  

Here are some site features you may activate at your root site.

Feature Notes
Office SharePoint Server Enterprise Site Features  
Office SharePoint Server Publishing  
Office SharePoint Server Standard Site Features  

When you complete all of these steps, you should have a fully functional development environment for developing SharePoint applications.  I am sure there are things I have missed, so I’ll update this post as I find them.  This whole process will probably take 4 – 8 hours depending on your hardware and your familiarity with SharePoint and Windows Server.  I would love to just post my working virtual machine, but obviously due to licensing I can’t do that. :)  I hope this gets new developers in getting an environment started.  Post a comment if you have any questions.

Follow me on twitter.

Comments

# re: Building a Windows Server 2008 MOSS Virtual Machine

Monday, December 7, 2009 3:58 PM by Scott Lock

Great post Corey.  One thing to add is that you need to make sure that MOSS_Setup is has the right DB rights.  It needs to have dbuser, dbcreator, and dbsecurity roles in order to access the instance during setup.

# re: Building a Windows Server 2008 MOSS Virtual Machine

Thursday, August 19, 2010 10:04 AM by Jeff Lee

Thanks for the post.  I am setting up the development environment following this post.  How about install & setup the mail server?  I install smartermail but it seems sharepoint cannot talk to the mail server.  Any thoughts?

# re: Building a Windows Server 2008 MOSS Virtual Machine

Friday, December 28, 2012 3:41 PM by Adam Bentley

Thanks for the article.  With Microsoft's current SharePoint 2007 installer, some of the steps above are not necessary.  For example, it was not necessary to install SQL Server manually as SQL 2005 is now part of the installation.  For a no frills server it was not necessary to create the extra accounts.

# re: Building a Windows Server 2008 MOSS Virtual Machine

Wednesday, February 6, 2013 9:37 AM by CoreyRoth

@Adam you are right it will install for you but I still prefer to install separately.  I still do recommend creating separate service accounts because that is more likely to be closer to what you experience in a production environment.

Leave a Comment

(required)
(required)
(optional)
(required)