To Install and configure Apps on SharePoint 2013, initially we need to do 3 things:

  1. Set up DNS for App domain.
  2. Create the App management and Subscription Settings service application.
  3. Configure SharePoint to use App domain.

Step1: Setup DNS for App domain:

You must configure a new name in Domain Name Services (DNS) to host the apps. To help improve security, the domain name should not be a subdomain of the domain that hosts the SharePoint sites. For example, if the SharePoint sites are at Contoso.com, consider ContosoApps.com instead of App.Contoso.com as the domain name. For more information, see Plan for apps for SharePoint 2013. When an app is provisioned, it provisions a unique DNS domain name (for example, Apps-12345678ABCDEF.ContosoApps.com, where 12345678ABCDEF is a unique identifier for the app). You need a wildcard Canonical Name (CNAME) entry for your DNS domain to support these unique names.

Depending on your configuration (for example, if you are using WINS forward lookup), you might have to create a new forward lookup zone first, or you can start with a wildcard CNAME entry in the same zone as the SharePoint site domain. In the following procedures, you create a forward lookup zone, and then create a wildcard alias record for the DNS domain name that allows for individual apps to create unique domain names within your app domain. In these procedures, we use DNS Manager for Windows Server 2008 R2. For more information about DNS server in Windows Server 2008 R2, see DNS Server. If you have a different type of DNS server, follow the procedures in the documentation for that server type.

To set up DNS go to Administrative tool and select DNS.

DNS

All Apps on SharePoint have unique URL domain names, so before we’re done, we need to set up a wildcard alias.

A wildcard alias basically mean you can add anything in front of the domain name and point it to a specific address.

In the DNS manager select for your domain and right click select “New Alias”.

DNS Manager

In the New Resource Record dialog box, enter an asterisk (*) as the Alias name, and then either browse to the record for your server or type in the DNS-name of your server. See the below screenshot.

DNS Manager

Click ok and then ok.

DNS Manager

To verify the new domain name

  1. Verify that the user account that is performing this procedure is a local administrator on the domain controller.
  2. Click Start, and then click Command Prompt.
  3. At the command prompt, type ping followed by a subdomain of the domain that you created, and then press ENTER.For example, ping Apps-12345678ABCDEF.contosoapps.com

    If the ping command returns the correct IP address, then your wildcard for the domain name was configured successfully.

Create a new wildcard SSL certificate

If you are using Secure Sockets Layer (SSL) for the SharePoint sites in your environment, or if you use any apps that use data external to the SharePoint sites, you should use SSL for your apps. To use SSL, you create an SSL certificate for your app domain (for example, ContosoApps.com).

The domain should be added in the form of a wildcard (for example, *.ContosoApps.com). You need a wildcard certificate instead of individual certificates because each installed app has its own subdomain.

Configure the Subscription Settings and App Management service applications

You have to add two services which are required to Install and Configure Apps on SharePoint 2013.

  1. App Management Service
  2. Microsoft SharePoint foundation Subscription Settings Service

Run the below powershell commands to start the services.

Get-SPServiceInstance | where{$_.GetType().Name -eq “AppManagementServiceInstance” -or $_.GetType().Name -eq “SPSubscriptionSettingsServiceInstance”} | Start-SPServiceInstance.

Before running powershell scripts use “Start-Transcript”, so that you can track all the commands you are executing in SharePoint 2013 management shell.

Start-SPServiceInstance

After executing the powershell commands please check whether the services are running on the machine from the central administration screen.

Go to central admin, under Application management and select manage services on the server.

Servers in Farm

Once you came to know that App management and Subscription Settings services are running, you have to configure respective service applications.

To configure please follow the below steps.

To perform the below steps I am using the farm admin account here, but if you have any Specific account running this service You can use that account.

$account = Get-SPManagedAccount “ sp\administrator”.

1. AppManagementService

$appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account.

2. SPSubscriptionSettingsService

$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account.

3. Creating AppManagementService Service Application

$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName Appmanagement_Service_DB.

4. Creating Proxy for AppManagementService service application

$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc.

5. Creating SubscriptionSettingsService Service Application

$appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName SubscriptionSettings_Service_DB.

6. Creating Proxy for SubscriptionSettingsService service application

$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc.

You can check the Application services and databases created after running above powershell commands.

Please check the below screenshots.

Service Applications
Service Application Databases

Step 3: Configuring SharePoint to use App domain:

To configure the Apps for SharePoint. Go to an Apps section in Central admin.

Apps-Central admin

Click on Configure Apps URLs and then enter the App domain you set up. In my example I am using same domain where my SharePoint running.

In addition, you need to decide on an App prefix that all App DNS names will get. Anything will do if you follow the description of Characters allowed.

For each instance of an App you install and activate, SharePoint creates a unique URL to access the App. The unique URL starts with the prefix you choose followed by a unique identifier set by SharePoint and Finally the App domain you have created.

Configure App URLs

Configure App URLs

Click ok.

We are one step away to use Apps and the SharePoint Store.

For that we need to create an App catalog site collection to hold our Apps. When you add an App by uploading an App package, this is where you will do that.

From the Apps section of Central Administration, select Manage App Catalog. Leave the Create a new app catalog site choice selected and hit OK to advance to the Create App Catalog step.

Manage App Catalog
SharePoint App Catalog

Enter the Title, website address and primary site collection administrator details. It is similar like creation of site collection. Once it got created it will be redirected to “Manage App Catalog” section.

You can see in the below screens App catalog has been created.

Manage App Catalog

Click on the site URL to access the App catalog.

SharePoint App Catalog