Here’s the situation: your SharePoint developer created a new solution package that needs to be installed in your SharePoint Farm. It may seem a bit daunting if you’ve never done this before, but really, it’s quite easy! Along with the blog post below, I’ve created a video so you can see a new SharePoint solution deployment (and retraction) in action!
There are two steps to installing a solution package:
1. Import the solution (this adds it to the solution database of a SharePoint Server farm)
2. Deploy the solution (this makes the solution available)
This article discusses direct deployment of solution packages and not sandboxed solutions. It’s possible to deploy solutions into a sandbox which is a restricted area allowing programs to access only specific resources. This way you can isolate potential problems from the rest of the server farm. Read more about sandboxed solutions.
Let’s look at importing a solution package. It’s straight forward and done through PowerShell:
- First copy the solution package (WSP) to a location on a SharePoint web server.
- On the server, navigate to Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell.
- Type the following: Add-SPSolution –Literal Path <SolutionPath>
- Example: Add-SPSolution –LiteralPath c:\solution\myawesomesolution.wsp
This adds the solution to the solution database. Now you can actually deploy it. The easiest way to do this is to use the Central Administration User Interface:
- Open Central Administration
- Click System Settings
- Click Manage farm solutions
- Click the solution you want to deploy
- Click Deploy Solution
- Choose Now to deploy the solution now, or schedule a time by choosing At a specified time. You may want to specify a deployment time if there are multiple web servers. Choose a time when the servers will be at a low load (usually overnight).
- Choose either a specific web application or all web applications (if available).
- Click OK.
The solution has now been deployed. If there are multiple web servers in the SharePoint farm, the timer job will deploy the solution to those servers automatically. This is why you may want to specify a time to deploy solutions in production environments.