title: How to deploy and configure a web part include solution package in sharepoint 2013?
body: <p>I had deployed web part and post this ...
  This isn`t question, If anybody require ,please use following the way. I think that it will be usefully anybody..thanks.</p>
  
  <p><strong><em>Configure and deploy Web Parts include solution package in SharePoint 2013</em></strong></p>
  
  <hr>
  
  <p><strong><em>1. Deploy solution packages (SharePoint Server 2013)</em></strong></p>
  
  <p><strong>A.    Adding a solution package</strong>
  Before you can deploy a solution package, you must add it to the solution database of a SharePoint Server farm.
   Important 
  You must be a member of the Administrators group on any computer on which you run Windows PowerShell. 
  To import a solution package by using Windows PowerShell 
  1.  On the Start menu, click All Programs.
  2.  Click Microsoft SharePoint 2013 Products.
  3.  Click SharePoint 2013 Management Shell as an administrator.
  4.  At the Windows PowerShell command prompt, type the following command:
  5.  Add-SPSolution -LiteralPath </p>
  
  <pre><code>Ex: add-spsolution -literalpath “D:\Debug\F21WebPart.wsp"
  </code></pre>
  
  <p>The solution is added to the farm's solution store. To use the solution, follow the procedure in the next section in this article. 
  Quick Overview
  Here’s a quick overview of what we’ve learned with a few more tidbit commands you’ll probably need along the way:
  •   Add Solution
  Add-SPSolution c:.wsp
  •   Deploy/Install Solution
  Install-SPSolution –Identity .wsp –WebApplication http:// -GACDeployment
  •   Update Solution
  Update-SPSolution –Identity .wsp –LiteralPath c:.wsp –GACDeployment
  •   Uninstall Solution
  Uninstall-SPSolution –Identity .wsp –WebApplication http://
  •   Remove Solution
  Remove-SPSolution –Identity .wsp</p>
  
  <p><strong>B.    Deploying a solution package</strong>
  You can deploy imported solutions by using the Central Administration Web site or by using Windows PowerShell. After a solution has been added to the solution store by using the Windows PowerShell Add-SPSolution cmdlet, it must be deployed to a site before it can be accessed. 
   Note 
  You cannot add a solution to the solution store by using the Solution Management page in Central Administration. 
  The following procedures show how to deploy an imported solution to a site in the farm by using either the Central Administration Web site or Windows PowerShell.
  To deploy a solution by using Central Administration 
  1.  On the Central Administration Home page, click System Settings.
  2.  In the Farm Management section, click Manage farm solutions.
  3.  On the Solution Management page, click the solution that you want to deploy. 
  4.  On the Solution Properties page, click Deploy Solution. 
  5.  On the Deploy Solution page, in the Deploy When section, select one of the following: 
  o   Now 
  o   At a specified time. If you select this option, specify a time by using the date and time boxes. We recommend that you select a time when the load on the destination servers is low.
  6.  In the Deploy To? section, in the A specific web application list, click either All web applications or select a specific Web application.
  7.  Click OK.
  To deploy a solution package to a single Web application by using Windows PowerShell 
  1.  On the Start menu, click All Programs.
  2.  Click Microsoft SharePoint 2013 Products.
  3.  Click SharePoint 2013 Management Shell.
  4.  At the Windows PowerShell command prompt as an administrator , type the following command:
  5.  Install-SPSolution -Identity  -WebApplication 
  Where:
  o    is the name of the solution.
  o    is the URL of the Web application to which you want to deploy the imported solution.
  Ex: add-spsolution -literalpath “D:\Debug\F21WebPart.wsp" –WebApplication “http:///pwa/”</p>
  
  <p>By default, the solution is immediately deployed. You can also schedule the deployment by using the time parameter. 
  To deploy a solution package to all Web applications by using Windows PowerShell 
  1.  On the Start menu, click All Programs.
  2.  Click Microsoft SharePoint 2013 Products.
  3.  Click SharePoint 2013 Management Shell.
  4.  At the Windows PowerShell command prompt as an administrator, type the following command:
  5.  Install-SPSolution -Identity  -AllWebApplications -time  -GACDeployment -CASPolicies
  Where:
  o   GACDeployment is the parameter that enables SharePoint Server 2013 to deploy the assemblies in the global assembly cache.
  o   CASPolicies enables the creation of a custom code access security (CAS) policy file and the activation of it in the Web.config file of the targeted site collection. 
  The solution is immediately deployed by default. You can also schedule the deployment by using the time parameter.</p>
  
  <p><strong>C. Verify the deployed Global Assemble</strong> 
  1.  On the Start screen, press CTRL + TAB to open the Apps list and then press V. The list will include all installed Visual Studio command prompts. (To open the Start screen, press the Windows logo key  on your keyboard.) 
  2.  Choose the Developer Command Prompt (or the command prompt you want to use).
  3.  Type the following command. For more detail, look gacutil
      gacutil /l F21WebPart</p>
  
  <p>•   Please remember the publickeyToken in gacutil window.</p>
  
  <p><strong>2. Deploy and configure a Web Part</strong></p>
  
  <p>To manually deploy and configure a Web Part 
  1.  Verify that you have the following administrative credentials:
  o   You must be a member of the local Administrators group on the server hostingSharePoint products.
  2.  Copy the .dll assembly in the project's Bin directory to the Bin directory in your Web application root directory. For example: C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin.
  3.  Locate the Web.config file in your application root directory and open it for editing.
  4.  Add the following safe-control entry for your custom assembly to the Web.config file: 
  5.  , Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Namespace="" TypeName="*" Safe="True" AllowRemoteDesigner="True"/></p>
  
  <p>Ex: </p>
  
  <p>Please use the PublicKeyToken you remembered in gacutil window
  Where:
   1.  is the name of the Web Part that is being deployed.
   2.  is the namespace that is associated with your Web Part.</p>
  
  <p><strong>3. Add a Component to the Web Part Gallery</strong></p>
  
  <p>Every Web Part should have a .webpart file, which is an XML file that describes the Web Part. The .webpart file also causes your Web Part to appear in the Web Part gallery. The following procedure is the easiest way to create a .webpart file after you deploy your Web Part and register it in the Safe Control list.
  To add a component to the Web Part gallery 
  1.  Verify that you have the following administrative credentials:
  o   You must be a member of the Farm Administrators group.
  2.  To create a .webpart file, navigate to http:///_layouts/newdwp.aspx, where  is the name of the server on which your SharePoint site is deployed.
  Ex.http:///pwa/_layouts/newdwp.aspx
  3.  Select the check box next to ..
  4.  Click Populate Gallery to add the YourWebPartName Web Part to the Team Site gallery.
  5.  In the Web Part gallery, select Edit to edit the Web Part, and then click Import. 
  You are prompted to specify a location for the .webpart file. You can also export ASP.NET Web Parts and import them to SharePoint sites.</p>