SharePoint 2013: Setting Up Dev Environment
Introduction
This wiki page is intended for each contributor who wants to create a DEV Environment. The general purpose of this document is to get a better understanding of SharePoint 2013 and its components.
Credits
It is important that we give credit where it is due. Margriet Bruggeman is the one and only Wiki Ninja Contributor who owns this series. Just taking a moment to give credit to her.
Hardware Requirements Overview
First of all, you need to think of the hardware you require. Go for an i7 quad core processor, equivalent or higher. Also make sure you have at least 32 GB memory, since SharePoint 2013 development machines require at least 24 GB of memory. Having a RAID 0 hard disk is also a good idea.
If you have less hardware specification that were used to install the SharePoint 2010, Still you can go ahead and start your SharePoint 2013 development journey.
You can go for VM with below software:
Windows 2008 R2, SP,SQL 2008 R2 SP and Visual Studio 2012.
It works without any performance glitches(i5 quad processor) on Oracle VM and allocated the 8GB RAM for SharePoint 2013 and 8GB for host machine.
Still you are not convinced to use the VM , I would suggest to dedicate on computer / laptop (even its better on core i3 3.07 GHz and 8GB RAM )to install the trial version of the above software.
See Also
- Overview
- Hardware and software requirements for other SharePoint 2013 capabilities
- Hardware requirements-location of physical servers
- Hardware requirements-web servers, application servers, and single server installations
- Hardware requirements-database servers
- Software requirements
- Optional software
- Links to applicable software
- Prerequisite installer operations and command-line options
Create a Virtual Machine
- On the Assign Memory screen, don't check Use Dynamic Memory for this Virtual machine. SharePoint 2013 doesn't like this, because it relies heavily on the use of AppFabric Distributed Cache. Instead, use 24 GB as Startup Memory.
- Hard disk size: use 50 GB, this can always be changed later.
- Connect to the WiFi virtual switch you've made earlier.
- Install Windows Server Standard (Server with GUI) - or another one of the GUI friendly server versions.
Required Software
Our ideal set-up is this: Run Windows Server 2012 on Hyper-V on a Windows 8 machine. At a high level, you need to have access to the following software:
- Visual Studio 2012 Premium edition (or another version)
- SQL Server 2012 including Service Pack 1
- Office 2013
- SharePoint Server 2013
General Tips for Making Windows Server 2012 Development Friendly
By default, Windows Server 2012 is not very dev friendly. I suggest some changes. At a high-level, do the following:
- Rename the server to something short, easy to remember and easy to type. I usually go stellar with this, with names like moon, mars, and nova.
- Enable Remote Desktop
- Disable Windows firewall
- Disable IE Enhanced Security
- Configure Windows update
- Configure time zone settings
Rename the Server
Rename the server to something short, easy to remember and easy to type. I usually go stellar with this, with names like moon, mars, and nova.
Start the virtual machine. The server manager starts automatically.
- Select Local Server.
- Click computer name.
- Click Change.
- Change the computer name to moon.
- Click OK twice.
- Click Restart now.
Enable Desktop Experience
It's very convenient to be able to access the virtual machine via the Remote Desktop Connection tool, so enabling this is high on my to do list.
- In the Server Manager, select Local Server.
- Click the computer name moon.
- Click the Remote tab.
- Select Allow remote connections to this computer.
- Click OK twice.
Disable Windows Firewall
- Win+Q
- Type Control
- Click Control Panel.
- Select System and Security > Windows Firewall > Turn Windows Firewall on or off.
- Turn off Windows Firewall for both Private network settings and Public network settings.
- Click OK and close Control Panel.
Test Remote Desktop Access
- On Windows 8, type Win+R.
- Type mstsc and click OK.
- Type moon and click Connect.
- A message appears informing you that the certificate is not from a trusted certifying authority. Check Don't ask me again for connections to this computer and click Yes.
Configure Windows Update
- Open Control Panel. This time, we'll do it via another route: point your mouse to the lower right corner, click Settings > Control Panel.
- Click System and Security > Windows Update
- Turn on automatic updates.
- Wait while it is checking for updates. Install the updates it finds, Windows will assure you that that's very important.
Time Zone Settings
- Open Control Panel.
- Click Set the time and date.
- Click Change time zone...
- I'll go for UTC +1:00, since I'm pretty near Amsterdam.
- Click OK.
- If you need to, change the Time as well (via Change date and time).
- Click OK when you're done and close Control Panel.
Changing the Administrator Password
Changing Password policies
- Type Win+R > gpmc.msc. This opens the Group Policy Management MMC add-in.
- Expand Forest lc.corp.
- Expand Domains.
- Expand the lc.corp domain.
- Right click the lc.corp domain and choose Create a GPO in this domain, and Link it here.
- Give it a name, and click OK.
- Right click it and choose Edit.
- Go to Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies.
- Double-click Password Policy.
- Set Enforce password history to 0 passwords remembered.
- Set maximum password age to 0.
- Set minimum password age to 0 days.
- Set minimum password length to 0 characters.
- Set Password must meet complexity requirements to Disabled.
- Close the Group Policy Management Editor window.
- Right click the ?New Group Policy Object` in the Group Policy Management Window and choose Enforced.
- Close the Window.
- Start the Windows PowerShell command prompt and type: gpupdate.
This effectively applies the new policy.
Change administrator password.
- If you like, now you can change the administrator password to something more simple.
- Open Active Directory Users and Computers.
- Select lc.corp > Users.
- Right-click Administrator and choose Reset password.
- Uncheck User must change password at next logon.
- Click OK.
While you're there, you may as well create a couple of test user accounts test1 to test3 with passwords that are easy, never expire, and can't be changed by the users.
Convert a Server to a Workstation
Convert it to workstation.
It's a good idea to make life easier for yourself and convert the server in look-and-feel to a workstation, as described at http://www.win2012workstation.com/ The web site contains a link to the Microsoft Server Converter 2012 tool that should do the heavy lifting for you, but it's supposed to be 51 MB in size. This is ridiculously large, it should be less than 1 MB in my opinion, so we don't really trust it. The tips on the website however are solid. We've done the following ourselves:
- Disable CTRL+ALT+DEL
- Disable Shutdown Event Tracker
Disable CTRL+ALT+DEL
- Go to Start > Administrative Tools.
- Double-click Local Security Policy.
- Click Security Options > Local Policies > Security Options.
- Search Interactive Logon: Do not require CTRL+ALT+DEL and choose Enabled.
- Click OK.
Disable Shutdown Event Tracker
Press Win+R.
- Type gpedit.msc and enter. This starts the Local Group Policy Editor.
- Expand Computer Configuration > Administrative Templates > System.
- Search for Display Shutdown Event Tracker, open it, set it to Disabled and click OK.
Folder Settings
Adjust Folder Settings to your liking.
- Open Windows Explorer
- Choose View > Options.
- Also, on the General tab > Navigation pane section, click Show All folders.
- Also, in the Navigation pane section, click Automatically expand to current folder.
- Click the View tab.
- Check Display the full path in the title bar.
- Select Show hidden files, folders, and drives.
- Uncheck Hide empty drives in the Computer folder.
- Uncheck Hide extensions for known file types.
- Uncheck Hide protected operating system files.
- Click the Apply to Folders button.
- Click OK.
Backup a clean Machine
This is a nice place to be.
Do a couple of things:
- Create a snapshot
- It's a good time to back it up: export the virtual machine.
Follow these steps:
- Open Hyper-V Manager, right-click the virtual machine > Snapshot.
- Right-click the virtual machine > Shut Down.
- Right-click the virtual machine > Export to export a clean, ready-to-rumble, Windows Server 2012 machine.
Dealing with Geographically Dispersed Locations
SharePoint isn't really designed to support a split geographic installation within a farm. There is no way to overcome the SQL latency issues that develop and its not a supported scenario. Yet, there are a couple of options you can pursue:
- Build two separate farms, then place services like mysites or shared services like search where they are used most. These services can then be shared with the remote farm. It won't solve latency issues for all of your users, but will improve the overall experience.
- There are several third party vendors that provide two-way real time replication between geographically separate farms.
- Create two farms, but use DNS so that a user is routed to the farm local to them. To the user, it'd all appear to be the same farm - but then you'd handle replication between the farms with a 3rd party tool.
Info taken from: http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/aaf7af12-4f1a-4c28-9f0c-7f87d46ec2b1
Disabling IE Enhanced Security
IE Enhanced Security, from a dev standpoint, is a nuisance. My advice disable it ASAP!
- In Server Manager > Local Server, locate IE Enhanced Security Configuration and click On.
- Now set it off for both Administrators and Users.
- Click OK.
Wireless Connection on Hyper-V
- Open Hyper-V Manager.
- Click Virtual Switch Manager.
- Select External and click Create Virtual Switch.
- Give it a name (calling mine WifiVirtualSwitch) and choose your External network. Leave the checkbox Allow management operating system to share this network adapter.
- Click OK and Yes.
Once you have done this, you can use this connection during the creation of your new virtual machine to ensure internet connectivity on the server. Which, for SharePoint 2013, I'd say is nothing short of an installation requirement. You can also change the connection for existing machines by doing this:
- Make sure the virtual machine is turned off.
- Click Settings.
- Click Network Adapter.
- In the Virtual Switch drop down box, select your virtual switch (mine is named WifiVirtualSwitch).
- Click OK.
Where to install software
- Install Visual Studio 2012 on Windows 8, I like to have Visual Studio 2012 installed on both Windows 8 as on the virtual machine.
- Install Office 2013 on Windows 8, The same that goes for Visual Studio 2012, I like to have Office on both the host machine as on the virtual machine.
Install VS.Net 2012
Install Visual Studio 2012 on the virtual machine
Well, what to say? You're a developer, aren't you? What you're waiting for!
Install Tools
Now install SharePoint specific templates.
- Download the Microsoft Office Tools for Visual Studio 2012 at http://msdn.microsoft.com/en-us/office/apps/fp123627.aspx
- Click the Download the Tools link.
- Wait while Web Platform Installer 4.5 does murky things which take a lot of time.
- Install Microsoft Office Developer Tools for Visual Studio 2012.
Installing SQL Server
Install SQL Server 2012 with sp1 (At the time of writing, this is the latest version of SQL Server.)
- Choose New SQL Server stand-alone installation and follow instructions.
- Select All Features with Defaults.
- Note: At this point, you can't install the SSRS add-in for SharePoint yet. You'll need to do that after SharePoint is installed.
- Since its the first installation, it's fine to choose Default instance.
- Provide a valid account name for SQL Server Analysis Services. We've made sure that at this point, the admin account and password never need to be changed anymore, so we're using this account. For a dev machine, acceptable, we think.
- When you're asked to choose an authentication mode, choose Mixed Mode. This account, at this point, needs to have a complex password.
- In the Analysis Services Configuration dialog window, Add Current User.
- In the Reporting Services Configuration dialog window, choose Install Only for both options.
- Add Current User in the Distributed Replay Controller dialog window and make your server name [moon, in our case] the controller.
Installing SPS2013
- First run the prerequisiteinstaller. Nowadays, during SharePoint 2013 installation, you really want your server to have an internet connection. For a dev environment, a permanent was is just as handy!
- Use the wizard to install features for now.
- It doesn't hurt to create a default site collection now.
It's possible that you get an error message similar to this: "Prerequisites keeps trying to start and failing to do so. Fails: start "Launch SharePoint preparation tool" "E:\prerequisiteinstaller.exe" /continue"
- Prevent startup by going to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
- Delete SharePointServerPreparationToolStartup_0FF1CE14-0000-0000-0000-000000000000.cmd
Install Hyper-V on Windows 8
Hyper-V is not enabled by default. After installing Windows 8, you need to enable it.
- Press Win+R.
- Type appwiz.cpl.
- Click the Turn Windows features on or off link.
- Check Hyper-V and click OK.
Configure Workflows
- Download Windows Azure Workflow at http://www.microsoft.com/en-us/download/details.aspx?id=35375
- Get the workflow manager, workflow manager BPA, workflow client, and workflow tools (which equates to all available downloads!)
- Try to install the Workflow Manager. It will possibly ask to install the Web Platform Installer tool (if you didn't do this before), allow this by running it.
- This will also install the Workflow Client.
- Once the Workflow Manager Configuration Wizard starts, click Configure Workflow Manager with Custom Settings.
- Check the SQL Server Instance that will be used to create the various workflow databases. In my case, this database is called moon.lc.corp.
- By default, the Farm Management database will be called: WFManagementDB.
- By default, the Instance Management database will be called: WFInstanceManagementDB.
- Scroll down to see the other required settings.
- By default, the Resource Management database will be called: WFResourceManagementDB.
- Choose the Service Account that runs the workflow services. In my case, this is administrator@lc.
- On a dev environment, accept the Auto-generate option to create SSL and outbound signing certificates.
- Enter a certificate generation key.
- Confirm this by entering it again.
- Accept the default Workflow Manager Management Port at 12290.
- Accept the default HTTP port at which Workflow Manager listens for management requests at 12291. Note that this feature should be enabled in production environments, so it's perfectly alright in a dev environment.
- Check Allow Workflow Management over HTTP on this computer.
- Uncheck Enable firewall rules on this computer.
- Accept the default Admin group of BUILTIN\Administrators. This group is granted access to all databases configured as part of the Workflow Manager farm.
- Click Next.
- Now, the Service Bus configuration page opens.
- By default, the Farm Management Database is called SbManagementDB.
- By default, the Gateway Database is called SbGatewayDatabase.
- By default, the Message Container Database is called SBMessageContainer01.
- In the section Configure Service Account check the Use the same service account credentials as provided for Workflow Manager.
- In the section Configure Certificate, check the Use the same certification generation key as provided for Workflow Manager.
- Accept default ports. 9355 for HTTPS Port, SSL accessible port for a Service Bus deployment.
- 9354 for TCP port, Network-accessible port for a Service Bus deployment.
- 9356 for Message Broker Port, used for message broker port communication.
- 9000 for Internal Communication Port Range.
- Uncheck Enable Firewall Rules on this computer.
- In the Configure Admin Group section, again use BUILTIN\Administrators.
- Click Next.
- Click Apply.
- Click Close.
**Please note **that the Workflow Manager Client needs to be present on every SharePoint node in the farm.
- Configure SharePoint for Azure workflow
- After installing Windows Azure Workflow, you need to use PowerShell to configure the communication between SharePoint 2013 and Windows Azure Workflow. Do the following:
- Press Windows+Q.
- Type SharePoint.
- Click SharePoint 2013 Management Shell.
Execute the following command:
Register-SPWorkflowService -SPSite "http://moon " -workflowHostUri "http://moon:12291 " -AllowOAuthHttp
Where: -SPSite refers to one of your site collections.
Troubleshooting Search Suggestions
What to do when search suggestions don't show up? Run the "prepare query suggestions" timer job!
If you set up search suggestions (as described in http://technet.microsoft.com/en-us/library/jj721441.aspx ) you may notice that no suggestions drop down from the search bar. That makes sense because they only appear after the "prepare query suggestion" timer job has run. You can force this via PowerShell like this:
Start-SPTimerJob -Identity "prepare query suggestions"
- Based on the content of: http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/33265dfd-1316-4c57-92b9-31f0d8f0078c
Configuring AD Domain Services
Running SharePoint 2013 in an AD environment that can be played around with is quite high on my 'Gimme Gimme' list.
- Open Server Manager.
- Click AD DS (if it's not there, first add the AD DS feature).
- Click the More... link behind the text Configuration required for Active Directory Domain Services at MOON.
- Click Promote this server to a domain...
- Select Add a new forest.
- My company is called Lois & Clark IT services, so I use the following root domain name (which is nice and short): lc.corp.
- Click Next.
- Accept defaults and type a super secret DSRM password.
- Click Next.
- Ignore the warning about the fact that DNS delegation can't be created and click Next again.
- Wait until you can verify the NetBIOS name assigned to the domain. In my case, it's LC and that's exactly what I want.
- Click Next 3 times.
- The prerequisites dialog window displays some warnings, but should pass never the same.
- Click Install.
After installation was successful, the server restarts.
Depth Performance Counters
First of all, please get the PressurePoint Dragon for SharePoint 2013 at http://gallery.technet.microsoft.com/PressurePoint-Dragon-for-87572ee1 to be able to simulate the specific SharePoint actions described here.
Then, go to this gallery to obtain the scripts to be able to monitor the performance counters as described on this page: http://gallery.technet.microsoft.com/PowerShell-script-for-e7085a38
Finally, you can keep track of http://www.sharepointdragons.com to keep updated with the latest info about this initiative.
The PressurePoint <Request> action equals to an HTTP GET request to a SharePoint page. The following performance counters are relevant for this type of action:
Processor\DPCs Queued/sec
Processor Information(_Total)\ Processor Time
ASP.NET Applications\Requests/Sec
**Mind you: **This section is a work in progress and is therefore not finished yet. Because of that, the PowerShell script for this part is not yet available.
Backup SharePoint Online
- Trust MS back-ups, as there's no way to make your own back-ups in SharePoint Online.
- Rely on SharePoint recycle bin functionality for basic back-up/restore functionality.
- Save important doc lib content via Windows Explorer view and store this info somewhere safe.
- Use 3rd party providers that do support back-ups of SharePoint Online (there are providers who offer these services, but on this Wiki page no advertisements for commercial products are allowed).
Service Accounts
or a SharePoint installation, this page recommends the following best practices and naming conventions for service accounts:
Remember:
Managed Service accounts are limited to a total of 20 characters - including the Domain Name (for example Domain\SP_Name - total characters should be less than 20)
- SQL_Service, for the SQL Server service.
- SQL_Admin, for the SQL Server administrator.
- SP_Admin, for the SharePoint administrator and setup user.
- SP_Farm, for the SharePoint farm service.
- SP_WebApps, for the user-facing web application app pool.
- SP_ServiceApps, for the service application app pool.
- SP_Crawl, default content access account.
- SP_UserSync, user profile synchronization account.
- SP_EnterpriseAdmin, powerful account for handling all kinds of high privilege operations.
- Farm administrators, normal admin user accounts are used as SharePoint Farm Administrators.
You can also add a "ga" after each Administrator Account to make explicit that this is a "Global Administrator" Account! An example can be "SP_Farmga". So we know that this account is the Global Administrator of the SharePoint Farm.
SQL_Service
This account should be used for running SQL Server engine and SQL Server Agent. Create inside Service Manage Accounts Container inside AD to keep it controlled. Have the following characteristics:?
- Belongs to the Users Domain Group.
- Use only for this two SQL services, if installed more (what you should do) keep the service accounts suggested by the installation program..
SP_EnterpriseAdmin
This account is needed for performing high privilege jobs and (such as installing fixes, upgrades, etc.). It needs to have the following permissions:
- Either SQL Administrator or db_owner of all SharePoint databases.
- Local administrator of each SharePoint server.
- Member of Farm Administrators group.
Configure SkyDrive Pro
Install Office 2013 and the Favorites section of Windows Explorer shows a new node for SkyDrive Pro.
Configuring Apps
Start Subscription Service
- Open your SharePoint Central Administration.
- Go to Application Management > Manage services on server.
- Start Microsoft SharePoint Foundation Subscription Settings Service.
Create Forward Lookup Zone
- Press Windows + Q.
- Type DNS and click it. This opens the DNS Manager.
- Select [server, in my case: moon] > Forward Lookup Zones > [domain name, in my case lc.corp]
- Right-click domain name (lc.corp) > New Alias (CNAME).
- In the Alias name textbox, enter *.app.
- As a result, *.app.lc.corp will be the FQDN for any SharePoint App that gets installed on the environment.
- Click Browse.
- Double-click [server name (moon)] > Forward Lookup Zones > [domain name (lc.corp)] > (same as parent folder).
- Click OK twice.
- Start a command prompt and type: ping test.app.lc.corp. If you followed the steps correctly, this returns a reply.
Create Service Applications
- Go to http://msdn.microsoft.com/en-us/library/fp179923.aspx
- Copy the script from section "Create an isolated app domain on your development computer", step 6. This script looks like this:
$account = Get-SPManagedAccount "domain\user"
$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account
$appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account
$appSubSvc = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPoolSubSvc -Name SettingsServiceApp -DatabaseName SettingsServiceDB
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $appSubSvc
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
From a SharePoint 2013 Management Shell prompt, execute this code.
Verify the new service applications
App Management Service
- Open SharePoint Central Administration.
- Click Application Management > Manage Service Applications.
- Verify that AppServiceApp is present and started.
- Verify that SettingsServiceApp is present and started.
- Click Application Management > Manage services on server.
- Check that the App Management Service is running.
App Catalog
- Open SharePoint Central Administration.
- Click Apps.
- Click Manage App Catalog.
- Click Create a new app catalog site.
- Click OK.
- Enter Title: DevAppCatalog.
- Enter Web Site Address: (sites/) DevAppCatalog.
- Enter a Primary Site Collection Administrator, in our case this is lc\administrator.
- Enter the following end users: Everyone.
- Click OK.
Apps for Office from the Store
- Open SharePoint Central Administration.
- Click Apps.
- Click Configure Store Settings.
- Set Apps for Office from the Store to Yes.
- Click OK.
Click App Management > Configure App URLs
In the App Domain text box, type: app.[domain name] (e.g. app.lc.corp).
In the App prefix text box, type any prefix that is used to prefix the subdomain of App urls, e.g.: lcapp.
Click OK.
Now, check if you can add online Apps to your SharePoint environment. But don't do this using the SharePoint System Account, otherwise you'll see a message stating: "Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again etc. etc."
This is a nice example of misplaced SharePoint 2013 friendliness. Don't expect this small problem to go away by itself!
Troubleshooting
If you're trying to add Apps and get an error saying:
- "Sorry, something went wrong.
- Sorry, we couldn't complete your purchase. Please try again later."
Root causes
- The machine you use to visit the SharePoint Store is configured with an incorrect date.
- You're using a System Account for accessing the SharePoint Store
Troubleshooting Office Web Apps
- After you successfully ran the binding, always check to see if preview, view mode, edit mode are working for word, excel, powerpoint file types. You may get mixed results for what works/doesn't work between Word, Excel, and PowerPoint because the backend technology to render each of them is different!
- Create a matrix of actions vs file formats tests
- Always upload / create a new file after binding or other changes have been made. Test new changes on these new files. ( ideally, upload / create a new Word, Excel, and PowerPoint every time.
- Have Process monitor tool ready and running on both SharePoint and WAC server when testing the binding. You may see some process fail to start or errors out during the rendering the preview, or during rendering edit mode. (Due to access denied to server registry, file system, or simply network fail to communicate).
What client API should you choose when building Apps?
- Apps that offers Create/Read/Update/Delete (CRUD) actions against SharePoint or BCS ( Business Connectivity Services ) external data, and are hosted on an application server separated by a firewall benefit most from using the JavaScript client object model.
- Server-side code in Apps that offer Create/Read/Update/Delete (CRUD) actions against SharePoint or BCS external data, and are hosted on an application server but **not **separated by a firewall mainly benefit from using the .managed client object model, but the Silverlight client object model, JavaScript client object model or REST are also options.
- Apps hosted on non-Microsoft technology (such as members of the LAMP stack) will need to use REST.
- Windows phone apps need to use the mobile client object model.
- If an App contains a Silverlight application, it should use the Silverlight client object model.
- Office Apps that also work with SharePoint need to use the JavaScript client object model.
- SharePoint API improvements