Sunday, June 14, 2015

Create a SharePoint 2013 Development Server

Here are some steps to help you build a SharePoint 2013 development box.

Preparation

  1. ISO and Update Files
    1. Copy  SP iso to all servers to your chosen drive in a folder called install\SharePoint. I usually choose a drive other than C:. So in this case we'll use the D: drive.
    2. Copy the following important windows server 2008 R2 updates to d: drive folder called install\WindowsUpdates
      1. The SharePoint parsing process crashes in Windows Server 2008 R2 (KB 2554876).
      2. FIX: IIS 7.5 configurations are not updated when you use the ServerManager class to commit configuration changes (KB 2708075).
      3. Hotfix: ASP.NET (SharePoint) race condition in .NET 4.5 RTM:
        1. Windows Server 2008 R2 SP1 (KB 2759112)
    3. OR if you're using Windows Server 2012, just install the hotfix for the race condition:
        1. Windows Server 2012 (KB 2765317
  2. Turn off UAC
  3. Prerequisites
    1. Mount SP iso and run prerequisiteinstaller.exe. Restart Server.
    2. Mount iso again and in CMD type F: (mounted drive) then type prerequisiteinstaller.exe /continue to continue the installation where it left off.
  4. Updates
    1. Install all the updates listed above for your OS
    2. Restart if asked
  5. Loopback
    1. Run Disable loopback. In Powershell, run the following command as administrator (may have to reboot server) 

      New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck"  -value "1" -PropertyType dword

Install SQL Server 2012

Instead of typing in all the steps here, I highly recommend the article Instruction Guide for Installing SQL Server 2012 SP1 for SharePoint 2013. It is very detailed and very accurate and has lots of pictures to help guide you through.

After you are done installing SQL, you need to set the max degree of parallelism to 1.

Using SQL Server Management Studio configure the max degree of parallelism option by performing the following steps:
  1. In Object Explorer, right-click a server and select Properties.
  2. Click the Advanced node.
  3. In the Max Degree of Parallelism box, select the maximum number of processors to use in parallel plan execution to 1.

Install SharePoint

Now follow these remaining steps. I've kept it to the most simple steps to make it quick and easy.
  1. Install SharePoint 2013
  2. Create Service Apps - I included instructions below on how to use the wizard AND how to install them yourself. This is really personal preference. The service apps I've selected are the bare bones. You can add more as needed for your development efforts.
    1. Quick and easy - When CA opens on the MI server, choose to let the Wizard configure service apps for you. Only check the following service applications:
      1. State Service
      2. Usage and Health Data Collection
      3. Managed Meta Data
      4. Search
    2.  A little harder - Create Service Application - This is my preferred order:
      1. State Service
      2. Usage and Health Data Collection
      3. Managed Meta Data Service
      4. Search
      5. Secure Store
  3. Set up Virus exclusions
  4. Configure Logging
  5. Address SVCHOST.exe memory leaks by Disabling the Windows Update Service
  6. Address Noderunner memory leaks
  7. Install SharePoint CUs to match your production environment. Be sure to reboot your dev server and run the SharePoint config wizard after install.

    See SharePoint 2013 Build Numbers by Todd Klindt for a comprehensive list of SharePoint updates. My rule of thumb is that I don't install any hotfixes unless I have a serious problem. I'll update CUs about 3 months behind the current date again, if I'm having issues. For example, my farm had many distributed cache issues and so I installed the September 2014 CU which helped greatly. It took a bit of reading through all the CU information to find which CUs were somewhat stable though. I'd be more inclined to install Service Packs, but again waiting for some months to let any bugs get noted first.
  8. Install AppFabric CU

Configure Managed Service Account

In Central Admin > Security > Manage Service Accounts
Add your account as a managed account. DO NOT select to enable automatic password change.

Change the Farm Account

If your company has a password policy to change the password every so often, you may want to change your dev instance to run under a local farm account. This way you don't have to change the password of the farm account all the time. This is just a personal preference on your part. See my article on how to Change the Farm Account on a Dev Box for instructions if you want to do that.

    Sunday, June 7, 2015

    Change Farm Account on Dev Box

    Below are the steps to change the SharePoint farm account on your development server to a local user.

    Start by creating a local user on your server.

    Add New User
    Open Computer management on your server. Go to Users and Groups. Under Users > Actions > Add new user



    Add User as Local Administrator
    Under Groups > Administrators > Add
    Type <computer name>\spfarm and check names. OK. Apply. OK. (use a password you’ll remember)
     
     
      
    Update Additional Security Groups
    Add permissions as below:
    • WSS_WPG – add the new farm account
    • WSS_ADMIN_WPG – add the new farm account

    Add Yourself as a Farm Administrator
    In Central Admin > Security > Manage the farm administrators group
     
    Make sure your name is listed. If not, add it.
     
     
      
    Add Local Account as Managed Account
    Right click on SharePoint Management Shell and choose to Run as Administrator.
     
    Type the following cmdlet:
    $cred = Get-Credential
     
    When you get a prompt, type in the local account you made <computer name>\spfarm and enter the password.
     
    Now type the cmdlet:
    New-SPManagedAccount –Credential $cred
     
     
      
    In Central Admin > Security > Configure Managed Accounts. You will see your newly added account.
      
    Update Farm Account
    Run Command Prompt (CMD) as admin.

    Navigate to the BIN folder by typing the following two lines:
    cd C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN
    STSADM.EXE -o updatefarmcredentials -userlogin "<computer name>\spfarm" -password "<password>" 

    Reset IIS
    Run following command in CMD (as administrator - you should still have this window open from before):
    iisreset /noforce


    Configure App Pools
    Open IIS. Change Identity of the highlighted app pools below to the <computer name>\spfarm account.




      
      
    Configure Services Account
    Go to Services. Update or verify the following services are using the spfarm account. To update, right click the service and choose properties > Log On tab > Browse. Enter <computer name>\spfarm and click Check Names. Enter password. Apply, OK.
    • AppFabric Caching Service
    • SharePoint Search Host Controller
    • SharePoint Server Search 15
    • SharePoint Timer Service
    • SharePoint User Code Host
    Restart each service.
     
     
     
     
      
     
    Reset IIS
    Run cmd prompt as administrator (switch back to CMD) and type the following command:
    iisreset /noforce


    Update Search Service App
    In CA, go to Manage Service Applications > Search Service Application. Click on the Default content access account link.

    Change the Default content access account to new spfarm account: <computer name>\spfarm