Sunday, July 21, 2013

Definitive Guide to Installing Microsoft Dynamics CRM 2011 on Windows Server 2012

I see a lot of questions come across the forums about installing Microsoft Dynamics CRM 2011 on Windows Server 2012, which is now fully supported since UR-13 came out.  It seems that there are a lot of manual steps you have to take before you start to avoid getting halfway through the install only to have it fail partway through, requiring you to do an uninstall, fix the issue, and re-install.  This often times leaves extra AD groups and other things that need to be cleaned up afterwards so hopefully I can save you some trouble up front.

Here we go!  Let's start with the SQL Server Configuration.

SQL SERVER 2012 Install and Configuration

I am going to assume that if you are installing CRM on 2012 then you are probably using SQL 2012, which may not be true, but their isn't too many  differences in the SQL Server install, we will run through a few things anyways though.

1. When installing SQL Server, or after you installed SQL Server (you can add them after install), you will want to make sure you install a couple features on your SQL Server

- Full Text Indexing
- SQL Server Reporting Services - Native

2. You will want to specify a domain user for your reporting services service as in installs where SQL Server is broken out from the app server, only a domain user (not a local user) will work.

3. You will want to set SQL Server Agent Service to start automatically in SQL Server Configuration Manager

4. Take a moment and install the IIS web server role on your Windows Server installation to handle the web interface for SQL Reporting Services and host it's web services

5. SQL Reporting Services will not be configured out of the box, you will have to do that, we will take a moment and look at this.

   - Open Reporting Services Configuration Manager, it was installed
with the SQL Server feature install.
   - Click on the section for Web Service URL and accept the default values given, or configure your own.


   - Now click on database, follow the wizard and specify the database information and create your report server database.




CRM Service Accounts

There are several service accounts you will need to create to install CRM on Windows Server 2012.  This process is no different than what you needed to do for Windows Server 2008 so I will link you to the Technet document that provides all the specific information about the 4 different service accounts you need to create for your CRM install.

  -  Get the service account information here: http://technet.microsoft.com/en-us/library/hh699825.aspx 

    NOTE: If your account names are long enough that the domain\usernames names are truncated (pre-win2k standards)  in comparison to the user@domain.com username you have to use the domain\user truncated form for the service accounts when configuring CRM.  It will fail and will tell you the credentials are invalid immediately if you don't, so you may catch this on your own, but wanted to draw your attention to it.  :)

Configure the Update Patch

Since UR-13 Microsoft officially supports Windows Server 2012, but that doesn't mean that the current server installer supports it.  The web download installer is slip-streamed with UR-6 but that won't install on Windows Server 2012 without some configuration.

1. Create a Config.xml file in the same directory as your installer.
2. Go to http://catalog.update.microsoft.com
3. Search for ‘KB2434455’ and install the windows update catalog
4. Click Add for “Setup Update for Microsoft Dynamics CRM Server 2011”
5. Click View Basket
6. Click Download button
7. After download, un-zip the cab file for the 1033 version (if en-us) for your architecture and copy the              .msp file to a directory you will create called c:\temp (if it doesn't exist already)
8. Copy the following text to your Config.xml file
   
<CRMSetup>
<Server>
<Patch update=”true”>C:\TEMP\Server_KB2434455_amd64_1033.msp</Patch>
</Server>
</CRMSetup>
9.  Save the file
10. Do NOT run the CRM installer YET!

App Server Configuration on Windows Server 2012

Ok, now comes the really important stuff that will save you a ton of time by preventing uninstalls and reinstalls during this process.  There are several features you will need to install manually and maybe one you need to remove prior to your install.  Failure to do these steps will result in the installation starting but not completing successfully.  This will then require an uninstall and a re-install, so make sure you take care of all of these up front.

  - Install (Role) IIS role
  - Install (Feature) Windows Identity Foundation 3.5
  - Install (Feature) Windows Search Service
  - Install (Feature) 2.0 to 3.5 .Net Framework

We need to take a moment to elaborate on the last one Install (Feature) 2.0 to 3.5 .Net Framework. This isn't nearly as easy in many cases as it should be.  As it turns out it doesn't install the sources on the system and the ISO is required in some circumstances.  This makes it a little tougher.

Almost every time I try to install this I have to do it manually using the methodology here: http://www.danielclasson.com/install-net-framework-35-server-2012/

Essentially you have to use the dism tool via administrator command line and specify the source location on your source media.  It's pretty straight forward on Daniel's post linked above.

Starting the CRM Installer So It Uses Your Configuration File

1.  Launch a command prompt as administrator
2.  Run the CRM Installer with parameters to tell it to use your Config.xml file
        I.E.  C:\{CRM SetupMedia}\SetupServer.exe /config config.xml
3.  Setup will launch and you can continue.  It should state that Setup has finished downloading the    update!!!  This is important.  If it states that no update was available, something is wrong with how you  hooked up the update patch file and your config file.

Now you just need to follow the rest of the install process as usual.

Install Update Rollup 13 (or the newest) on the Server

Not much to say here, but here's the link to UR-13: http://www.microsoft.com/en-us/download/details.aspx?id=37133

Install SRS (SQL Reporting Services) Data Connector

This is installed on the SQL Server that also acts as your SQL Reporting Server for CRM (does not have to be the same SQL Server you use for your CRM Server SQL Server)

1. First install Windows Identity Foundation 3.5 from windows server manager from the features section
2. Now insert or copy your CRM media to/on your SQL Server (if not also your app server), and navigate to the CRM installation media and to the /SRSDataConnector folder.
3.  Run the installer as administrator and install the connector
4. Apply UR-13 for the SRS data connector to the same server.
5. Add your reporting services service credentials (can be found in services on the SQL Server or in Reporting Services Configuration Manager) to the PrivReportingGroup.
5. Restart the SQL Server that you are using as your SQL Report Services server.
6.  After your restart, access CRM and try to open an out of the box report, if it fails, you may see an rsItemNotFound error, but you may not.  If you do you need to publish the out-of-the-box reports manually.
7. If you do need to publish manually consult the quick blog here.  It has it laid out beautifully. http://mg--blog.blogspot.com/2011/05/report-is-not-getting-displayed-when.html


Items Not Covered
- Email Router (update to come)
- IFD



- I hope this helps!

5 comments:

  1. Replies
    1. Your quickly becoming my favorite blogger. Thanks for the help. I especially like your blog list. ;)

      Delete
  2. Hi Jamie, I'm getting an access denied error when I follow this procedure.

    The error is: error parsing config file. The spesific hash error in the log file is an access denied error. Any ideas?

    I've followed the above instructions to the letter.

    ReplyDelete
    Replies
    1. Hmm, retyped the entire xml file in lowercase. Oddly it suddenly works.

      Delete