在SharePoint中部署.wsp解决方案包

 

 

自己开发的应用程序,可以用WSPBuilder工具打包成.wsp文件,安装、部署和删除.wsp可以用stsadm命令,该命令在C:\Windows\Program Files\Common File\Microsoft shared\Web server extensions\12\Bin路径下:

 12\Bin 我记得是2007的路径
14 bin 是 sharepoint 2010
15 bin 是 sharepoint 2013

 

 安装:stsadm -o addsolution -filename [*.wsp文件路径]\*.wsp;

部署:stsadm -o deploysolution -name *.wsp -allowgacdeployment -immediate

 部署指定的网站:Install-SPSolution –Identity CodeArt_PermissionEx.wsp –WebApplication http://amid01110/ -GACDeployment

删除:stsadm.exe -o deletesolution -name *.wsp

注意做完后要重启IIS,命令为:iisreset /noforce

 

实例:

 

安装到管理中心
stsadm -o addsolution -filename d\erhougwbl.wsp
部署到管理中心
stsadm -o deploysolution -name erhougwbl.wsp -allowgacdeployment -immediate
部署指定的网站
Install-SPSolution –Identity erhougwbl.wsp –WebApplication http://test/ -GACDeployment

 

 

 


stsadm -o addsolution -filename d\xijianfs.wsp

 

stsadm -o deploysolution -name xijianfs.wsp -allowgacdeployment -immediate

 

Install-SPSolution –Identity xijianfs.wsp –WebApplication http://test/ -GACDeployment

 

 

 


stsadm -o addsolution -filename d\xijianfs.wsp

 

stsadm -o deploysolution -name xijianfs.wsp -allowgacdeployment -immediate

 

Install-SPSolution –Identity xijianfs.wsp –WebApplication http://test/ -GACDeployment

 

 

 

 

 

 

 

一.用SharePoint Powershell命令部署

1.iisreset 回收应用程序池
2.disable-spfeature -identity "XXX" -url -force 停用功能
e.g.C:\PS>$w = Get-SPWeb http://*** | ForEach{ $_.URL }    
    C:\PS>Get-SPFeature -Web $w |%{ Disable-SPFeature -Identity $_ -URL $w}
3.Uninstall-SPSolution -Identity ***.wsp -WebApplication http://*** -GACDeployment 收回部署包
4.Remove-SPSolution -Identity ***.wsp 删除部署包
5.Add-SPSolution “D:\ES Deploy\***.wsp“ 添加解决方案包
如果是沙河解决方案 add-SPUserSolution -LiteralPath c:\***.wsp -Site http://sitename
6.Install-SPSolution -Identity ***.wsp -GACDeployment -WebApplication http://*** 部署解决方案包
7.enable-spfeature -identity "XXX" -url 激活功能
也可以直接更新部署包(没怎么用过,因为都是按VS的部署步骤操作)
8.Uninstall-SPSolution –Identity MySharepointProject.wsp –WebApplication http://myserver-sp1:2010/
 
二.用07的stsadm方式部署
1.iisreset 回收应用程序池
2.stsadm -o deactivatefeature -name/-id *** -url *** [-force] 停用功能
3.stsadm -o retractsolution -name **.wsp -allcontenturls/-url[http://**] -immediate 回收部署包
4.stsadm -o deletesolution -name **.wsp -override 删除部署包
5.stsadm -o addsolution -filename c:\**.wsp 添加包
6.stsadm -o deploysolution -name **.wsp -allcontenturls/-url[http://**] -immediate -allowgacdeployment 部署包
7.stsadm -o activatefeature -name/-id *** -url *** [-force] 激活功能
8.stsadm –o upgradesolution –name ***.wsp –filename D:\***\。。。\**.wsp –immediate –allowCasPolicies

 

 

转载于:https://www.cnblogs.com/914556495wxkj/articles/3401514.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值