Configure SharePoint 2013 Core Services

In this article which is number 2 in the series I will walk through how to configure the core SharePoint 2013 services.  The first article looked at the installation process.   The next article will focus on some of the BI services available in SharePoint which is more complex and also more interesting if you ask me.

Running PowerShell

If you have managed to avoid PowerShell for this long then congrats.  As you work with SharePoint 2013 and other products you will need to learn some of the basics.  In SharePoint 2013 there are many thanks that require PowerShell and the GUI simply is not an option.  So to set up our PowerShell console go to the start screen (if Windows 2012) or to the Programs menu and locate the SharePoint 2013 PowerShell module. Right click it and “pin” it on the task bar.

image

Once this is done, from the task bar, hold down SHIFT+ right click on the icon and select Properties. 

image

Select Advanced and click “Run as Administrator”, Press OK and OK.  This will ensure that when we run SharePoint PowerShell commands from this icon in the future the administrative context will be used to give us the the require access.

 

Configure the State Service

The state service is a temporary work area for SharePoint Services to store temporary data.  Note that the State and User Health Data Collection Services are two services that can not be installed from the GUI.

Click the icon to start PowerShell and type the following lines of code which will set up the state service with a chosen database name. 
New-SPStateServiceApplication -Name "State Service Application" 
Get-SPStateServiceApplication| New-SPStateServiceApplicationProxy –defaultproxygroup

Get-SPStateServiceApplication| New-SPStateServiceDatabase -Name "State_Service_DB"

Get-spdatabase | where-object {$_.type -eq "Microsoft.Office.Server.Administration.StateDatabase"} | initialize-spstateservicedatabase

The results should look similar to this.

image

Configure the Usage and Health Data Collection Service

This service should be created in order for SharePoint to log the health of the services in the logging database.  This service must be created via PowerShell. The Configuration Wizard will also configure this service but it is not recommended to use this method for production environments for any service.

From the PowerShell console run the following lines of PowerShell.

$usagename = “Usage and Health Data Collection”

$usagedbname = “UsageandHealth”

$serviceinstance = Get-SPUsageService

New-SPusageapplication –Name $usagename –DatabaseName $usageDBName –UsageService $serviceInstance

Results example

image

A useful option for this service is to set the log file location for example.

$us = Get-SPUsageService

$Logs = “C:\Logs\”

$us | set-SPUsageService –Loggingenabled $true –UsageLogLocation $logs

Once the service is provisioned you can see the log file location and all the other services that can be enabled for logging.  If there are specific events in this list you wish to log this can also be added by PowerShell. Here we look at an example of the “SQL Exception Usage” events.

set-SPUsageDefinition –Identity “SQL Exceptions Usage” –Enable

image

Here we can see our changes we made in PowerShell.

 image

 

Register Managed Accounts

It is recommended to add any service accounts that SharePoint will use for application pools and for certain SharePoint services.  It is recommended to use separate accounts for different services in order to help secure the service as well as make it easier to manage and maintain.  Remember that service accounts if they are standard AD accounts as they should be may expire depending on security policies in AD.  Therefore some implementations use accounts with non expiring passwords.  In some environments this may not be acceptable and could be seen as a security risk.  SharePoint can manage the password expiry and reset for us where it generates the passwords for the service accounts itself.  In our example we have gone with standard accounts.

 

As a rule of thumb I create a generic account for core roles such as secure store, metadata management etc, and a BI service account for BI services for example.

From Central Admin navigate to Security, configure managed accounts.

image

Click the configure managed accounts link and you should see farm account.

image

Click Register Managed Account and enter details for the BI account, application pool accounts and generic service accounts you wish to use.  Our generic service account example is shown here.

image

You should then see the service accounts listed here.

image

 

Create the Business Data Connectivity Services

This service is required for SharePoint to be able to use external data sources such as web services or databases for content within SharePoint sites.

To set up BDC services from the GUI open Central Admin, Application Management, Manage Service Applications.  Select New, Business Data Connectivity Service.

image

Enter the SQL Alias or server name and rename the database to remove the default GUID.

image

As this is out first core service we need an application pool and so I have selected to create a new application pool with out generic account registered earlier.  This application pool can then be used for other services we configure later.

image

Ensure the correct service account is selected and click ok. #

 

image

From Central Admin, Application Management, Manage Services on this Server, Start the BDC Service

image

The service should start ok.

image

 

Create the Managed Metadata Service

The managed metadata service is required for several other services and so should be one of the first services to be configured.  The services dependant on the metadata service are  Search, User Profiles, and Machine Translation Service.

From Application Management, Manage Service Applications, select New, Managed Metadata Service. Enter the service name, database server and database name.

image

Select use existing application pool and select the generic pool we created earlier.

image

The application pool selected will use the account specified when the pool was created. Ignore the configurable account in the screenshot above as this is not actually the selected option here.  Leave the last two checkboxes selected and click OK.

image

There is no progress screen here so wait a few seconds to be returned to the applications list.  Return to Central Admin, and start the Managed Metadata web Service.

image

This should now start after a few seconds.

image

To complete the setup of this service return to the application service and click the second metadata entry in the list and select Properties in the ribbon above.

image

If you see the Something Went Wrong error wait a few minutes while the service is provisioned properly in the background.

image

Don’t click on the blue text URL link, click elsewhere and select Properties and ensure the following check boxes are ticked and press OK.

image

Once done then click on one of the Managed Metadata Service links to show the screen below.

image

I always add the service account and farm account to Term Store Administrators as a precaution, from experience with SharePoint 2010.

image

This completes the metadata service configuration.

 

Create the Secure Store Service

The Secure Store Service is used to store credentials for applications such as Excel Services (if required) and Performance Point Services which depends on the Secure Store Service configuration.

from Manage Service Applications, Select New Service Application, Secure Store Service.

image

image

Select existing application pool and select the generic app pool created earlier.

image

leave the default for the audit Log or modify to your requirements.

image

image

Select the Secure Store and click Manager

image

The red error is to remind us to generate a new key so click Generate New Key

image

Enter phrase and make a note in a secure place.  It would be needed if the database needed to be restored.

image

Start the Service is not already started from Central Admin, System Settings, Services on this server.

image

Create Word Automation Services Application

This service is used to convert word documents into various formats and is an optional service.

From Central Admin, Application Management, Manage Service Applications, select New, Word Automation Service Application

image

Enter a name for the application and select the generic application pool created earlier and click OK.

image

Start the service, from Services on Server locate the service ..

image

and click start.

image

 

Configure Search Service Application

Ensure the search service accounts are registered as managed accounts.  Central Admin, Security, configure Managed Accounts.

There are several accounts required which I have listed here together with an example account name in AD.

Search Service Applies to all search service application, can be changed in configure service accounts in security (central Admin)
Search Admin App pool account. Can be same as Search Service.
Search Query App pool account. Can be same as Search Service.
Default Content Access Recommended to have a specific account for this account.

For this demo I will use the Search Service account SPSearch.

image

Create the Search Service Application

Note : Each search service has a separate content index and there can be multiple search applications to partition sensitive content.  It is also recommended to use a different server for each service application or assign more resources as required. 

From Application Management, Manage Service Applications, New Search Service Application.

image

Admin web service (can specify an admin web service app pool account here.)

image

image

Wait for the service to provision

image

image

Select the Search Service Application and click Manage.

image

You can change the default crawl content account here which is set to the application service.  use an account that has read permissions on as many of the content locations you with to crawl.  Where specific crawl accounts are required for specific locations create a content crawl rule and assign it the account.

Also specify the email for an administrator account.

image

Now lets configure a content source which will be a site created in SharePoint.  Click the Content Sources link on the bottom left as shown above. 

You will see a content source created by default.  This is created to crawl all content on local farm. You can also create additional content sources for other content such as file shares or other SharePoint farms or websites.   Click on this entry “Local SharePoint Sites”.

 image

If the farm was configured as a farm (not single server) and you did not select to auto configure the services.  This is the recommended approach for production.  You will see there is no incremental or full crawl running or scheduled to run.  So we must edit this content source to specify crawl schedules etc.

Also once into the edit screen ensure the correct URLs are in place for any sites you may have created.

image

I have set the incremental crawl to the default values (I did change 5 to 10 minutes)

image

Note I have not scheduled a full crawl.  Depending on the content size you may not want to schedule a full crawl.  Rather run it once and let the incremental crawl keep it up to date.  Press ok on this screen.

Use the drop down next to Local SharePoint Sites and trigger a full crawl now.

image

These are the basics to get you up and running with Search. I may cover this in more detail in the future but it is as vast subject on which many books have been written purely on this topic.

That’s it for now!

Ok now we have configured all core services for the SharePoint.

In the next post I will cover adding a SharePoint server to the farm we just created and configuring some of the services to run on this second server.  We will also look at how to create the user website.

About Mitesh Chauhan
Mitesh Chauhan, Azure Cloud Solutions Architect. This is my blog where I share articles and thoughts on IT Infrastructure and architecture. The topics I am most passionate about are Implementation and architecture of rock solid Cloud Infrastructure based around SQL Server and Windows Server mainly using Microsoft Azure. MCTS - Azure Architecture MCTS - Azure Implementation MCSE Server Infrastructure (Windows Server 2012) , MCITP SQL Server 2008, Togaf Certified, Prince 2 Practitioner.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: