Introduction
This posting walks you through the process of building a simple two-tier SharePoint Server 2010 development and testing environment on Windows 2008 R2 and using VMware Workstation 7.X. It will involve six steps: build servers, configure DC & DNS, join domain, install SQL Server, Install SharePoint Server, Configure SharePoint Server and Configure DNS. Procedures are also provided for several optional steps: Install SharePoint Designer and Install AdventureWorks Lab Environment. Aside from VMware Workstation, all other software can be obtained without cost as freeware or trialware.
Step 1: Build Servers
Summary
This posting has presented a step-by-step walkthrough of how to build a virtual SharePoint Server 2010 environment for development and testing. All of the software elements can be obtained as freeware or trialware, except for VMware Workstation.
References
This posting walks you through the process of building a simple two-tier SharePoint Server 2010 development and testing environment on Windows 2008 R2 and using VMware Workstation 7.X. It will involve six steps: build servers, configure DC & DNS, join domain, install SQL Server, Install SharePoint Server, Configure SharePoint Server and Configure DNS. Procedures are also provided for several optional steps: Install SharePoint Designer and Install AdventureWorks Lab Environment. Aside from VMware Workstation, all other software can be obtained without cost as freeware or trialware.
Step 1: Build Servers
- Build two Windows Server 2008 R2 SP1 instances.
- Though the clone template sets RAM at 2 GB, 1.5GB works fine with no noticeable decline in performance.
- On first server (and in this order!):
- Set computer name: spdev11.
- Configure network adapter IP address.
- Configure DNS to point to ISP DNS.
- Add role: Active Directory.
- Add role: DNS.
- After completion, verify that new forward lookup, pointing to this DNS, was automatically created.
- Configure PDC emulator to synchronize time with the Windows time service:
- Perform Best Practices scans on the DC and DNS roles to check for any significant issues:
- Add domain accounts: sp_admin, sp_web, sp_app.
- On second server:
- Set computer name: spdev12.
- Configure network adapter IP address.
- Configure DNS to point to own DNS.
- Join to domain.
- Point VM CD/DVD drive to SQL Server ISO.
- Launch installation.
- Create shared folder to host: service packs folder.
- Install Service Packs 1 & 2.
- Add account sp_admin:
- Add roles: dbcreator, securityadmin.
- Add own account as sysadmin.
- Create shared folder to host: installation folder.
- Verify all prerequisites in PrerequisiteInstallerFiles folder.
- Verify PrerequisiteInstaller.Arguments file.
- Launch PrerequisiteInstaller.exe.
- Launch setup.exe.
- After completion of setup, and the appearance of the Product Configuration Wizard, continue to next step.
- Continue the SharePoint Products Configuration Wizard.
- Connect to a server farm: Create a new server farm.
- Specify Configuration Database Settings.
- Database Server: spdev11.
- Database name: default.
- Specify Database Access Account.
- Username: contoso\sp_admin.
- Specify Farm Security Settings.
- [configure as desired].
- Configure SharePoint Central Administration Web Application.
- Specify port number: enabled: 2000.
- Configure Security Settings: ntlm.
- Service account: sp_app.
- When prompted to create a new web application and site collection, choose No.
- Check server Application and System logs and resolve common errors:
- Install SharePoint Server 2010 Service Packs (order is important):
- Install Foundation SP1.
- Reboot.
- Install Server SP1.
- Reboot
- Run Configuration Wizard.
- Install Foundation SP2.
- Install Server SP2.
- Reboot.
- Run Configuration Wizard.
- Create a team site.
- Register managed account: contoso\sp_web:
- Configure default website (team site) web application pool to use sp_web.
- Reset IIS:
- Check site collection administrators:
- On the team site, go: Site Actions > Site Settings > Users and Permissions > Site collection administrators.
- Verify that the accounts listed here are domain accounts.
- Local (host) DNS:
- On your local machine, navigate to C:\Windows\System32\drivers\etc\:
- Open the HOSTS file in any text editor.
- Add entries for the SharePoint Server's DNS settings:
- Test these entries by pinging them from the host:
- In Central Administration, add alternate access mappings for these entries:
- Domain DNS:
- Add Host (A) records for these entries.
- Install SharePoint Designer 2010.
- Install SharePoint Designer 2010 SP1 and SP2.
- Test by connecting.
- Attach the AdventureWorksDW for SQL Server 2008 R2 database from CodePlex.
- Download the AdventureWorks 2008R2 Analysis Services Project from CodePlex.
- Complete the installation procedure as discussed in Exercise 5 of Building a SharePoint 2010 Virtual Lab. [See note below]
- Download the Northwind solution package.
- Follow Chris Beckett's directions to install the package.
- Add the Northwind Trader employees to Active Directory.
- Download a sample user list (CSV) from Brian Dunning, and then place it on the server hosting the DC.
- Logon to the server hosting the DC (spdev11 for this posting).
- Open a PowerShell window.
- Create a CSV file containing all of the sample users to be added. The column headers can have any name, but they must be appropriately referenced in the script.
- Run Todd Klindt's simple PowerShell script for importing new accounts; or try other approaches (some are referenced below). A sample PowerShell script is provided in the Notes below. New-ADUser scripts must be run under an account with permissions to modify AD.
Summary
This posting has presented a step-by-step walkthrough of how to build a virtual SharePoint Server 2010 environment for development and testing. All of the software elements can be obtained as freeware or trialware, except for VMware Workstation.
References
- AlsTechTips: How to build and deploy clone servers on VMware Workstation
- TutorialsPoint: Adding Host (A) DNS Records in Windows Server 2008 R2
- SharePoint 2010 TechCenter: Updates for SharePoint 2010 Products
- Service Pack 1 for SharePoint Foundation 2010 (KB2460058)
- Service Pack 1 for Microsoft SharePoint Server 2010 (KB2460045)
- Service Pack 2 for Microsoft SharePoint Foundation 2010 (KB2687464)
- Service Pack 2 for Microsoft SharePoint 2010 (KB2687453)
- Microsoft Download Center: Microsoft SharePoint Designer 2010 (32-bit)
- Microsoft Support: Description of SharePoint Designer 2010 SP1
- Microsoft Support: Description of SharePoint Designer 2010 SP2
- Microsoft Office: Choose the 32-bit or 64-bit version of Office
- Microsoft Support: You cannot view a list in Datasheet view after you install the 64-bit version of Office 2010
- TechNet: Plan browser support (SharePoint Foundation 2010)
- SharePoint dev blog: SharePoint 101 Code Samples are now available
- SharePoint Bits: SharePoint 2010 Northwind Sample Database Site Template
- CodePlex: AdventureWorksDW Databases – 2012, 2008R2 and 2008
- MSDN Developer Network: Building a SharePoint 2010 Virtul Machine Lab
- Stephan Bren: Build a SharePoint 2010 Virtual Machine for Training and Development
- Microsoft Support: Windows Server 2008 R2 and Windows 7 evaluation version
- MSDN Developer Network: Setting Up the Development Environment for SharePoint 2010 on Windows Vista, Windows 7, and Windows Server 2008
- Chris Beckett: SharePoint 2010 Northwind Sample Database Site Template
- Critical Path Training: Building a SharePoint 2010 Virtual Machine Lab
- Todd Klindt's SharePoint Admin Blog: Using PowerShell to set up a test environment
- Dell Software: Using PowerShell to set up a test environment
- Let It Know: Create Active Directory users with Powershell
- Todd Klindt: The PowerShell script I use to create Active Directory users
- Brian Dunning: Free Sample Data for Testing
- TechNet: New-ADUser
- TechNet: Set-ADUser
- How to Run PowerShell Commands on Remote Computers
- TechNet: Windows PowerShell Users Guide: Running Remote Commands
- AD DS: The PDC emulator master in this forest should be configured to correctly synchronize time from a valid time source
- Attributes for AD Users (Windows 2008)
- Troubleshooting
- Configuring DC and DNS: configure the network adapter first before adding the DC and DNS roles. This way, the DNS configuration routine will automatically detect the adapter DNS setting, configure a forward lookup for it, and then change this setting to point to itself. This will save the effort of creating the forward lookup yourself.
- SharePoint Designer: before installing, assess whether Office 32-bit or 64-bit is installed. Install that version of Designer consistent with the Office version already installed. Additionally, complex compatibility issues may occur when using the 64-bit version. See the references for further discussion on this topic.
- AdventureWorks: thanks to Critical Path Training for making this procedure available. Note that the AdventureWorks database must first be downloaded and restored before the solution can be installed.
- Northwind: thanks and gratitude to Chris Beckett for his efforts in migrating this venerable database to the SharePoint Server 2010 platform. This solution package includes data only: all database tables have been migrated to appropriately named lists. No pages have been created. His Northwind solution was installable on SharePoint Server 2010 SP1 (fresh - no CUs) without issue. This sample content is useful in developing and testing dashboard methods. Visit his blog at SharePointBits. Note: A File Not Found error may be experienced whilst attempting to implement this solution to the root site collection of a new web application.
- PowerShell New-ADUser Script: here's a sample script for adding new users in bulk to Active Directory (all on one line):
import-csv c:\temp\100.csv | foreach-object {New-ADUser -SamAccountName $_.SAMAccountName -UserPrincipalName $_.SAMAccountName -GivenName $_.givenName -Initials $_.Initials -Surname $_.Surname -DisplayName $_.DisplayName -Name ($_.givenName + $_.Initials + $_.Surname) -Description $_.Description -Company $_.Company -StreetAddress $_.StreetAddress -City $_.City -State $_.State -PostalCode $_.PostalCode -OfficePhone $_.OfficePhone -Fax $_.Fax -EmailAddress $_.EmailAddress -AccountPassword (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force) -ChangePasswordAtLogon $False -PasswordNeverExpires $True -Enabled $True -PassThru -WhatIf}
- The Local farm is not accessible. Cmdlets with FeatureDependencyID are not registered.
- After setting up the farm using the domain administration account, logged in using regular account provisioned as member of domain admins. Then attempted to launch SharePoint 2010 Management Shell:
- To resolve: launch management shell as Administrator. Then execute following command: Add-SPShellAdmin [domain\username]
- If unsuccessful, logon to the server as domain administrator, then launch the management shell and execute the command.
- Note: do not attempt to add the login, roles and permissions manually directly to the SharePoint_Config database, as some have already discussed. There appear to be other configuration settings affected by this commandlet than just adding logins and configuring roles.
- This is what I attempted at first. Unsuccessful. I then left the database changes as-is, and then executed the Add-SPShellAdmin, as noted above. Unsuccessful. I then removed the changes I had made to the databases, and then re-executed the above commandlet: success.
No comments:
Post a Comment