EDIT: This has changed a little for Windows Server 2012 R2 RTM, so make sure that you also read my follow-up post before spending time on the below.

I was all excited when I found out that you could try out Windows Server 2012 R2 Preview for a free 30 day trial on Windows Azure.  So I proceeded to instantiate a virtual machine and also to attempt to install SharePoint 2013 Foundation.  It didn’t go so well.

The main problem is that you can’t install the SharePoint 2013 Prerequisites using the standard install wizard, since it doesn’t recognize Windows Server 2012 R2 Preview as a valid supported OS.  It displays an error: “There was an error during installation.  This tool does not support the current operating system”:

1 Error

 

I did finally get it to work, but it was not trivial at all.  First of all, you have to install the prerequisites semi-manually.  Then, you need to make sure that permissions are set properly on certain files and directories so that the SharePoint Configuration Wizard can successfully complete.  But dear friends, I am here to walk you through the process step by step.

I. INSTALL PREREQUISITES MANUALLY

A. INSTALL WINDOWS ROLES/FEATURES

First, make sure that you have installed the following roles and features in Windows 2012 Server R2 Preview:

ROLES:

  • Application Server
  • Web Server (IIS)
  • EDIT: IIS 6 Management Console (h/t Darma)

FEATURES:

  • ASP.NET 4.5
  • Windows Identity Foundation 3.5

If you can do this on your own, go ahead and do it, and then skip to the next section.  Otherwise, here’s the step by step:

1) If it’s not already up (it starts by default in 2012), bring up the server manager, Dashboard view.  It should look like this:

2 Server manager

2) Click on “Add roles and features”.

3) On the “Before you begin” page, click “Next”.

4) Select “Role based or feature based installation” and click “Next”.

5) If it isn’t already selected, select “Select a server from the server pool”, and the server that you are currently working on.  Then click “Next”.

6) On the “Select server roles” page, check “Application Server”,  ”Web Server (IIS)”, and (EDIT:) “IIS 6 Management Console” (under Web Server (IIS)->Management Tools->IIS 6 Management Compatibility->IIS 6 Management Console.  h/t Darma).  NOTE: When you check “Web Server (IIS)” or “IIS 6 Management Console”, another dialog will pop up, asking “Add features that are required for <feature name>?”  Click on the “Add Features” button here.  This will return you to the “Select Server Roles” page.  After adding all 3 roles, click “Next”.

7) On the “Select features” page, expand “.NET Framework 4.5 Features” group by clicking on it.  In here, check “ASP.NET 4.5″.

8) On the same page, check “Windows Identity Foundation 3.5″.  Click “Next”.

9) On the “Application Server” page, click “Next”.

10) On the “Select role services” page, check “Web Server (IIS) Support” and click “Next”.

11) When the “Add features that are required for Web Server (IIS) Support?” dialog pops up, click on “Add Features”.

12) Click “Next” again to go to the next page.

13) From the “Web Server Role” page, click “Next”.

14) From “Select role services”, click “Next”.

15) On the “Confirm installation selections” page, I suggest that you check “Restart the destination server automatically if required”.  (You’re going to need to reboot eventually anyway.)

16) Click “Install”.

17) Wait for feature installation to complete.  When it does, you can click “close”.  If the server doesn’t restart automatically, reboot it.

B. DOWNLOAD AND INSTALL SHAREPOINT PREREQUISITES 

OK, here’s the fun part.  You can easily download and install the prerequisites that SharePoint needs, but you have to do a little more than just download and run the install wizards.

The good news is that Craig Lussier has written three scripts to both download and install the SharePoint 2013 prerequisites.  The bad news is that only the download script works on Windows Server 2012 R2 (they probably work fine on vanilla 2012), because the install scripts use Prerequisiteinstaller.exe, which throws the same “This tool does not support the current operating system” error that we saw above.  So we’ll only take advantage of the download script, and do the rest manually.

So the steps:

1) Download the scripts from http://gallery.technet.microsoft.com/DownloadInstall-SharePoint-e6df9eb8.

2) Unzip to a directory of your choosing.

3) If you want to save the files to a new directory of your choosing, create that directory now.

4) Run PowerShell as an administrator.

5) In PowerShell, type “Set-ExecutionPolicy Unrestricted” and hit enter.  This is required because the scripts are unsigned and won’t run otherwise.

6) cd to the directory where you unzipped the scripts.  They should be .ps1 files.

7) Type “ .\Download-SP2013PreReqFiles.ps1” and press enter.

8) At the Security Warning, type “r” for “Run once”.

9) When prompted to “Please enter the directory path to where you wish to save the Sharepoint 2013 Prerequisite Files:”, type the directory of your choosing (which you may have created in step #3), and press enter.

10) The files will take some time to download, but there will be a text indicator that shows the download progress.

11) When you are done, the install files will be in the directory you chose.  Leave the PowerShell window open, since you’ll need it in a few steps.

12) Click on each file to run the installers, EXCEPT:

  • Windows6.1-KB974405-x64.msu
  • WindowsServerAppFabricSetup_x64.exe
  • AppFabric1.1-RTM-KB2671763-x64-ENU.exe

(In fact, you can even delete Windows6.1-KB974405-x64.msu.  I couldn’t get it to run successfully on Windows 2012 R2 no matter what Google told me.  Besides, it’s for installing WIF, which you installed above in step A.8, so we won’t be using it at all.)

13) Go back to PowerShell.  cd to the same directory as the install files.

14) To install AppFabric, type the following at the command line:

.\WindowsServerAppFabricSetup_x64.exe /i CacheClient","CachingService","CacheAdmin /gac

NOTE that there are quotes surrounding the commas.  These are important in PowerShell.  (h/t to Doug Hemminger for this tip).

15) Wait a minute or two for AppFabric to install.  Unfortunately, except for the cursor hourglass, there isn’t much of a cue that it’s done.

16) Now you can click on AppFabric1.1-RTM-KB2671763-x64-ENU.exe to install the AppFabric patch.

17) Reboot the server.

All the prerequisites should now be installed, and you should be able to install SharePoint 2013.

II. INSTALL AND CONFIGURE SHAREPOINT 2013 

A. INSTALL SHAREPOINT 2013

If you already know how, just install SharePoint the standard way that you know how (not the prerequisites, of course, which you’ve just installed), and skip to the next section.

If you’re new to SharePoint, here are the directions to install SharePoint 2013 Foundation (I have no idea how SharePoint Server differs):

1) Click on the SharePoint installer (sharepoint.exe).

2) On the “SharePoint Foundation 2013″ screen, click on “Install SharePoint Foundation”.

3) Follow the prompts through the wizard.  It should be relatively intuitive. (Note: For this example, I installed SharePoint as a stand-alone server type, since I was on Windows Azure and didn’t want to install a complete SQL Server database.  You can configure the Server Type however you like, though.  If you don’t know what to do, I’d recommend stand-alone for now.)

4) Do run the SharePoint Products Configuration wizard at the end of the installation.  Just note that it will fail during configuration task 8 of 10 (Creating sampledata), with the error: “The SDDL string contains an invalid sid or a sid that cannot be translated.”:

5 Config Wizard SDDL Failure

This is fine for now, as we will run the configuration tweaks below to fix that.  But we need the wizard to set up the initial databases and users for us to tweak first, so make sure that you do run it to failure, and click “Close” to exit the Wizard.

B. CONFIGURATION TWEAKS

If you go to Administrative Tools->Services, you’ll see that the AppFabric Caching Service is not running.  This is because it does not have proper permissions to a number of resources  We’ll need to set these and then start the service (as well as configure it to start automatically).

1. Set DATABASE permissions for NETWORK SERVICE

(I don’t remember the source for the below, but something similar was posted here.)

1) You will need SQL Server Management Studio so that you can access the database directly and set the permissions properly.  If you haven’t already installed SQL Server itself, then download and install SQL Server Management Studio Express for SQL Server Express 2008 R2 from http://www.microsoft.com/en-us/download/details.aspx?id=22985 (note that the version of SQL Express that SharePoint 2013 installs is 2008 R2, not 2012.  I know.).

NOTE: When installing SQL Server Management Studio Express, you will likely get warnings that say “This program has compatibility issues”.  Just click on “Run the program without getting help” and continue the install.

2) Run SQL Server Management Studio, and connect to the SharePoint database instance.  If you installed a stand-alone configuration, this server name you need to connect to is localhost\SHAREPOINT:

4 SQL Server login

 

3) Expand the database, and expand the “Security” folder.  You should see the “NT AUTHORITY\NETWORK SERVICE” user

6 SSMS Network Service

4) Right click on this NETWORK SERVICE user and select “Properties.”

5) Select “Server Roles” on the left, and check the “sysadmin” role on the right:

7 Network Service Perms

5) Click “OK”.  You can exit SQL Server Management Studio now.

2. Set config file permissions for the AppFabric Caching Service

(h/t: David Pokluda)

1) In the Windows File Explorer, navigate to C:\Program Files\AppFabric 1.1 for Windows Server\.

2) Right click on DistributedCacheService.exe.config and select “Properties”.

3) On the “Sharing” tab, click “Edit…”

4) Click “Add…”

5) In the white textbox on the bottom, type in “NETWORK SERVICE” and then “Check Names…”.  It should resolve to an underlined “NETWORK SERVICE”.

6) Click “OK”.

7) With “NETWORK SERVICE” selected, check the “Full Control” checkbox in the “Allow” column.

8) Click “OK”.

9) Click “OK” to exit the dialog box.

3. Set permissions on Analytics_<GUID> directory.

(h/t: Kancharia Srikanth)

1) If you are running SharePoint Foundation, navigate in the Windows File Explorer to C:\Program Files\Windows SharePoint Services\15.0\Data.  If you are running SharePoint Server, navigate to C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server.

2) You’ll see a folder in this directory called “Analytics_<some GUID>”, for example, “Analytics_939ab742-745f-456c-8623-fddca9b02334″ (your GUID will be different, of course).

3) Right click on the folder and select “Properties”.

4) Click on the “Sharing” tab, and then click on “Advanced Sharing…”.

5) Check the “Share this folder” checkbox.  Leave the default share name.

6) Click on the “Permissions” button near the bottom.

7) Click the “Add..” button.

8) In the white textbox on the bottom, type   “NETWORK SERVICE; WSS_ADMIN_WPG”.  Then click the “Check Names” button to make sure that the users resolve.

9) Click OK.

10) Select each user that you just added (NETWORK SERVICE and WSS_ADMIN_WPG), and check the “Full Control” checkbox in the “Allow” column.

11) Click “OK” to save the permissions.

12) Click “OK” to save the share settings.

13) Click “Close” to exit the dialog box.

4. Re-run the SharePoint Product Configuration Wizard.

1) From the Windows “Start” screen, type “SharePoint 2013 Products Wizard”

2) Click on the result that comes up.  The wizard will start running.

3) Click “Next” to run the wizard.

4) When the warning “The following services may have to be started or reset during the configuration:” pops up, just click on the “Yes” button.

5) You’ll notice that the wizard begins at task 4, but will successfully pass through task 8 to the last task (task 10), and complete successfully.

C. DEFAULT WEB APPLICATION PROVISIONING

At this point, SharePoint is successfully installed!  BUT: the permissions will be all messed up on the default web application, to the point that it will be unusable (or at least, that’s what I found).  You will have to delete and re-create the default SharePoint web application for it to be accessible.  Steps:

1. Delete and re-create the default web application.

1) From the Start screen, type “SharePoint 2013 Central Administration.”.  Click on the result that comes up.

2) IE will come up with Central Administration’s home page.

3) Under “Application Management”, click on “Manage web applications.”

4) You will see two web applications: the default (which is probably called “SharePoint – 80″) and “SharePoint Central Administration v4″.  Select the default SharePoint web application.  CAUTION: Do NOT select the Central Administration web application!

5) On the ribbon, click on the “Delete” button.

6) When the “Delete Web Application” dialog comes up, select ”Yes” for *both* “Delete Content Databases” and “Delete IIS Web Sites”.

7) Click the “Delete” button.

8) When the “Are you sure you want to delete this Web application…?” warning comes up, click “OK”.

9) You’ll have to wait a moment for the web application to be fully deleted, and for the Central Admin page to refresh, now showing only the Central Admin web application.

NOTE:  Clicking the “Delete” button does *not* refresh the page for me.  I don’t know why, and I can only assume it’s a SharePoint bug.  If it looks like nothing is happening, just close the warning dialog by clicking on the X on the upper right, and hit Ctrl+r to refresh the Web Applications page in Central Administration.  At *that* point, you should see that the default web application is gone, but Central Administration is still there.

10) Create a new web application by clicking the “New” button on the ribbon.

11) If you don’t know what to do at this point, just keep the defaults.  One thing you *will* have to do is go to “Select a security account for this application pool” and select “predefined”, which will probably display “Network Service”.  If you are an experienced SharePoint user, and you know what kind of web application settings you want, set them as you please.

12) Click OK.  You’ll see the “This shouldn’t take long” message, even though, of course, it will take quite some time for the web application to be created.

NOTE: Here, once again, you may have to X out of the dialog and refresh the Central Admin page to see the changes.

2. Create a default site collection in the new web application.

1) Under “Application Management” (on the left), find and click on “Create Site collections” (on the right).

2) Fill in as desired.  I would advise that one of the site collection administrators be the admin account that you used to install SharePoint.

3) Click “OK” to be returned to the Central Admin page, or click on the URL of the site to be redirected there (the site may take a while to come up on its first call).

 

Ta-Da!  That wasn’t too long, was it?  But now you have the latest and greatest SharePoint 2013 to play with on Windows Server 2012 R2.

Hope that this helps.  Please feel free to comment with questions or corrections.

 

 

54 Responses to Installing SharePoint 2013 on Windows Server 2012 R2 Preview

  1. [...] Install SharePoint Server 2013 Prerequisites (special if you have Server 2012 R2) [...]

  2. mohammad says:

    thank you so much . very useful , practical & nice article
    .

    just a notice : i run all of these setting on Win-server 2008 R2 + SQL 2008 R2 SP2 and done successfully.

    good luck

    • ahroth says:

      Thanks, Mohammad!

      I have a question, though: wouldn’t it be easier to just run the SharePoint configuration wizard to perform these steps on Win2008 and SQL2008R2? The whole reason I had to go through these steps was because the wizard failed on Win2012R2.

  3. chichiou says:

    Follow this article to manually install AppFabric 1.1 and then SharePoint Server 2013 installed fine. I did not need to do steps B and C.

    I used Windows Server 2012 R2 Preview and SQL Server 2014 CTP 1 in a Hyper-V virtual machine.

    Thanks for the help!

  4. srinivas says:

    Thanks, Really it help us a lot.

  5. Hi there. I’m working through this for RC RTM. The AppFabric install failed because SQL Server put a quote at the end of the PSModulePath system environment variable. After removing it, the other prereq steps work. Thanks for this!

    Ref: http://social.msdn.microsoft.com/Forums/vstudio/en-US/8cf55972-e441-4107-8c0d-1692ad03213d/error-with-installation-of-appfabric-11-on-psmodulepath

  6. Helena says:

    you are amazing!!!!!
    I got my error fix by following your steps to install SP2013 Prerequest !

  7. […] Installing SharePoint 2013 on Windows Server 2012 R2 Preview […]

  8. Darma says:

    Great, Thanks, I ran this procedure against 2012 R2 standard. I had to check IIS 6 management console to make it work.

    Thanks again

  9. Sy Fountaine says:

    In the Server Manager Dashboard in Windows Server 2012, I still receive errors that seem to suggest that the AppFabric Caching Service shuts down prematurely; likewise, the same happens with the Forefront Identity Manager Synchronization Service. Can you help with these problems?

  10. Sy Fountaine says:

    Another issue: could I install an instance of SQL Server 2012 Standard, thereby having both SQL Server 2008 Express and Standar 2012 running side by side?

    • ahroth says:

      Sure. I do it all the time. Although if you install SQL 2012 first, you could just use that as your SharePoint DB, without the need for SQL 2008 Express. But if you install both they should work fine.

  11. alex says:

    Aviv, thank you for your post!

    Few days ago was released WS2012 R2 + rollup1.

    I installed it, also I installed sql server 2012 (sp1+rollup1) and installed SPS2013.

    Now I didn’t this operations:

    2. Set config file permissions for the AppFabric Caching Service
    3. Set permissions on Analytics_ directory.

    kind regards,
    Alex

  12. Adeel R says:

    Thank you so much, you solve my problem once again thanks… :)

  13. helena says:

    mmm. I got error when running configuration wizard. .I didn’t see Analytics_”, under :\Program Files\Microsoft Office Servers\15.0\Data\Office Server

    folder. any idea ?

    3. Set permissions on Analytics_ directory.

    1) If you are running SharePoint Server, navigate to C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server.

    2) You’ll see a folder in this directory called “Analytics_”, for example, “Analytics_939ab742-745f-456c-8623-fddca9b02334″ (your GUID will be different, of course).

  14. Adeel R says:

    How can we configure AppFabric because I got this error when installing SharePoint Server 2013: “Windows Server Appfabric is not configured”.

    • Aviv Roth says:

      I’m not sure I understand. Where is the error appearing? After which step? Is it a dialog box or a log message?

  15. Bill Kelso says:

    Aviv-
    Thank you, this article was fantastic, I can’t tell you how much it helped me setup my development environment on my MacBook and let me keep what hair I have left on my head. Again thank you.

  16. Lamia says:

    Thanks so much for a great work.
    but although I followed all steps of installing prerequisites manually and now I have Application server role, webserver(IIS) role, .NET Framework 4.5 Features and .NET Framework 3.5 Features installed, it still gives me “Application Server Role, Web Server (IIS) Role: configuration error”
    and I found in the log the following:
    2013-11-29 11:23:03 – SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired
    2013-11-29 11:23:03 – Error: The tool was unable to install Application Server Role, Web Server (IIS) Role.
    2013-11-29 11:23:03 – Last return code (2)
    Any help please?

    • Aviv Roth says:

      Unfortunately, I’m not sure from your post. When you say “it still gives me “Application Server Role, Web Server (IIS) Role: configuration error”", what do you mean by “it”? The Prerequisites Wizard (which you shouldn’t be running at all)? The install wizard? Something else?

  17. Joe says:

    as you can see in the link below it is possible configure it with sql server 2012, i have done it but now i’m facing a problem SP can’t access to my sql account that i configured it with, i’ve been trying to solve that problem for weeks now

    http://technet.microsoft.com/library/4d88c402-24f2-449b-86a6-6e7afcfec0cd%28Office.15%29.aspx#section4

  18. Angel Leos says:

    Thanks a lot!!
    Very good.

  19. Syed Mohamed Hussainn says:

    Thank you so much, you solve my problem. once again thanks a lot it was really helpful for us…….

  20. Chris P says:

    You can use the SharePoint 2013 Pre-requisites installer on Windows Server 2012 R2 with a pretty simple workaround I found. N
    1. Navigate to C:\Windows\System32 and locate the ServerManager.exe.
    2. Copy this file and paste it into the same directory.
    3. Rename the file (should now be ServerManager – Copy.exe) to “ServerManagerCmd.exe”
    4. Run prerequisite installer again.

  21. Jannik Mortensen says:

    Hi and thanks for this great post.

    I can confirm what Chris P states! it works when renaming the file to Servermanagercmd.exe.
    Why?
    because in Server 2012 (not R2) Servermanager.exe is = Servermanagercmd.exe

    Its a bug in Sharepoint 2013 prerequisiteinstaller.exe

  22. Hoera says:

    Finally! Thanks Chris P! Have been searching for days for this fix, such a simple one as well.

    Thanks mate

  23. […] bir hata almamız durumunda ne yapmalıyız. Çözüme yönelik yaptığımız araştırmalarda http://www.avivroth.com/2013/07/09/installing-sharepoint-2013-on-windows-server-2012-r2-preview/ sitesinde konuya yönelik bir çözüm bulduk. Çözüm sahibi olarak bu sitenin linkini vermek […]

  24. Pete Edwards says:

    Thanks for an excellent post. Worked very well.

  25. Hamidul says:

    Thanks excellent work! Thanks for sharing!

  26. anas says:

    HI,
    Renaming servermanager.exe to servermangercmd dosen’t work for me ???

  27. Mark says:

    the severmanager rename helps the pre-req installer work but the main setup for sharepoint still moans about AppFabric!

    • Aviv Roth says:

      Can anyone help Mark? I haven’t tested the servermanager rename; I’ve only tested the manual prereq installation.

      • Mark says:

        Not to worry, MS has since bundled SP1 into a new Sharepoint 2013 download, via MSDN technet, or Partner Networks.

  28. Srinath Reddy says:

    Nice one..I done the installation

  29. Sheikh says:

    Thanks A lot for the installation process

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.