Showing posts with label AdventureWorks. Show all posts
Showing posts with label AdventureWorks. Show all posts

Thursday, September 26, 2013

Build a SharePoint 2007 Two-Tier Farm on Windows 2003

Introduction

This posting walks through the process of building a small two-tier SharePoint Server 2007 farm on Windows Server 2003 R2 that can be used for testing and development.  Performed on VMware Workstation 7.X.  Components of this environment will include:
  • Windows Server 2003 R2 Enterprise (trial version)
  • SharePoint Server 2007
  • SQL Server Express version 2005
  • .NET Frameworks 2.0 and 3.0
  • Domain controller
  • DNS server
Building the environment involves the following discrete steps:
  1. Build servers
  2. Configure DC and DNS
  3. Join Domain
  4. Install SQL Server Express
  5. Install SharePoint Server 2007
Step 1: Build Servers
  • Build two Windows Server 2003 R2 Enterprise instances using the clone developed in a previous posting.
  • Launch first server:
    • during mini-setup, set name to spdev21.
  • Launch second server:
    • During mini-setup, set name to spdev23.
Step 2: Configure DC and DNS
  • On the first server (spdev21):
    1. On Manage Your Server, click Add or remove a role.  The Configure Your Server wizard is launched.
    2. Configure domain as AdventureWorks.Com.
    3. After completion, verify that new forward lookup, pointing to this DNS, was automatically created.
    4. Reboot (automatic).
    5. Verify Internet connectivity and access.
    6. From Administrative Tools, launch Active Directory Users and Computers.
    7. Add SharePoint service accounts: sp_admin, sp_web and sp_app.
Step 3: Join Domain
  • On the second server (spdev23):
    1. Configure network adaptor IP and DNS.
    2. Verify Internet connectivity and access.
Step 4: Install SQL Server Express
  1. On spdev21:
    1. Install .NET Framework 2.0 SP2.
    2. Install SQL Server Express (2005).
    3. Add account sp_admin:
      • Add roles: dbcreator, securityadmin.
    4. Add own account as sysadmin.
    5. Note the SQL Server instance name: SPDEV21\SQLEXPRESS.
Step 5: Install SharePoint Server 2007
  1. Install .NET Framework 2.0.
  2. Install .NET Framework 2.0 SP2.
  3. Install .NET Framework 3.0.
  4. Open a command window and navigate to: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727.
  5. Run this command:
    • aspnet_regiis -I
  6. Verify that the SQL Server Browser service is running.  If it isn't, start it.
  7. Perform an installation of SharePoint Server 2007 per a previous posting.
  8. Install WSS SP1 and Office Server 2007 SP1; to version 12.0.0.6219.
  9. Reboot (optional).
  10. Install WSS SP2 and Office Server 2007 SP2; to version 12.0.0.6421.
  11. Reboot (optional).
  12. Install WSS SP3 and Office Server 2007 SP3.

References
Notes
  • Step 2: no roles were added to the clone template, during the clone template build process for Windows Server 2003 R2 Enterprise.  When adding a role to the machine for the first time, the Configure Your Server wizard will conveniently launch into adding the DC, DNS and DHCP roles.  It will also check the network adaptor settings and conveniently configure DNS forwarding automatically, based upon the settings it detects.
  • Step 4: Windows Server 2003 R2 Enterprise has .NET Framework 2.0 already installed.  Verify this by downloading and running dotNETInspector.
  • Step 5: I'm not sure why yet, but formally installing .NET 2.0 framework adds features and capabilities not originally there, even though Windows Server 2003 R2 is supposed to have .NET 2.0 already installed and this is verified by running .NET Inspector.
  • Step 5: installing a more recent copy of the SharePoint Server 2007 requires not only .NET Framework version 2.0 but also .NET framework version 3.0.
  • Step 5: installation of SP1 isn't necessary as it's rolled up into SP2. However, still good as an exercise.

Saturday, September 14, 2013

Build a SharePoint Server 2010 Two-Tier Dev Environment on Windows 2008 R2

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
  • 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.
Step 2: Configure DC and DNS
  • On first server (and in this order!):
    1. Set computer name: spdev11.
    2. Configure network adapter IP address.
    3. Configure DNS to point to ISP DNS.
    4. Add role: Active Directory.
    5. Add role: DNS.
    6. After completion, verify that new forward lookup, pointing to this DNS, was automatically created.
    7. Configure PDC emulator to synchronize time with the Windows time service:
    8. Perform Best Practices scans on the DC and DNS roles to check for any significant issues:
    9. Add domain accounts: sp_admin, sp_web, sp_app.
Step 3: Join Domain
  • On second server:
    1. Set computer name: spdev12.
    2. Configure network adapter IP address.
    3. Configure DNS to point to own DNS.
    4. Join to domain.
Step 4: Install SQL Server 2008 R2
  1. Point VM CD/DVD drive to SQL Server ISO.
  2. Launch installation.
  3. Create shared folder to host: service packs folder.
  4. Install Service Packs 1 & 2.
  5. Add account sp_admin:
    • Add roles: dbcreator, securityadmin.
  6. Add own account as sysadmin.
Step 5: Install SharePoint Server 2010
  1. Create shared folder to host: installation folder.
  2. Verify all prerequisites in PrerequisiteInstallerFiles folder.
  3. Verify PrerequisiteInstaller.Arguments file.
  4. Launch PrerequisiteInstaller.exe.
  5. Launch setup.exe.
  6. After completion of setup, and the appearance of the Product Configuration Wizard, continue to next step.
Step 6: Configure SharePoint Server 2010
  1. Continue the SharePoint Products Configuration Wizard.
  2. Connect to a server farm: Create a new server farm.
  3. Specify Configuration Database Settings.
    1. Database Server: spdev11.
    2. Database name: default.
  4. Specify Database Access Account.
    • Username: contoso\sp_admin.
  5. Specify Farm Security Settings.
    • [configure as desired].
  6. Configure SharePoint Central Administration Web Application.
    1. Specify port number: enabled: 2000.
    2. Configure Security Settings: ntlm.
    3. Service account: sp_app.
  7. When prompted to create a new web application and site collection, choose No.
  8. Check server Application and System logs and resolve common errors:
    1. Error 8193.
    2. Error 7043.
  9. Install SharePoint Server 2010 Service Packs (order is important):
    1. Install Foundation SP1.
    2. Reboot.
    3. Install Server SP1.
    4. Reboot
    5. Run Configuration Wizard.
    6. Install Foundation SP2.
    7. Install Server SP2.
    8. Reboot.
    9. Run Configuration Wizard.
  10. Create a team site.
  11. Register managed account: contoso\sp_web:
  12. Configure default website (team site) web application pool to use sp_web.
  13. Reset IIS:
  14. Check site collection administrators:
    1. On the team site, go: Site Actions > Site Settings > Users and Permissions > Site collection administrators.
    2. Verify that the accounts listed here are domain accounts.
Step 7: Configure DNS
  1. Local (host) DNS:
    1. On your local machine, navigate to C:\Windows\System32\drivers\etc\:
    2. Open the HOSTS file in any text editor.
    3. Add entries for the SharePoint Server's DNS settings:
    4. Test these entries by pinging them from the host:
    5. In Central Administration, add alternate access mappings for these entries:
  2. Domain DNS:
    • Add Host (A) records for these entries.
Optional: Install SharePoint Designer 2010 (32bit)
  1. Install SharePoint Designer 2010.
  2. Install SharePoint Designer 2010 SP1 and SP2.
  3. Test by connecting.
Optional: Install AdventureWorks Lab Environment
  1. Attach the AdventureWorksDW for SQL Server 2008 R2 database from CodePlex.
  2. Download the AdventureWorks 2008R2 Analysis Services Project from CodePlex.
  3. Complete the installation procedure as discussed in Exercise 5 of Building a SharePoint 2010 Virtual Lab.  [See note below]
Optional: Install the Northwind Trader Sample Site Collection
  1. Download the Northwind solution package.
  2. Follow Chris Beckett's directions to install the package.
  3. Add the Northwind Trader employees to Active Directory.
Optional: Add Sample Users to Active Directory
  1. Download a sample user list (CSV) from Brian Dunning, and then place it on the server hosting the DC.
  2. Logon to the server hosting the DC (spdev11 for this posting).
  3. Open a PowerShell window.
  4. 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.
  5. 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.
Optional: Install Visual Studio Trial Versions
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
Notes
  • 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} 
    
Troubleshooting
  1. The Local farm is not accessible.  Cmdlets with FeatureDependencyID are not registered.
    1. 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:
    2. To resolve: launch management shell as Administrator.  Then execute following command: Add-SPShellAdmin [domain\username]
    3. If unsuccessful, logon to the server as domain administrator, then launch the management shell and execute the command.
    4. 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.
    5. 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.