自己开发的应用程序,可以用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