MOSS通过此命令注册模板,web应用程序可以根据stp模块生成网站集

注:C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\bin

         stsadm –o addtemplate –title 凤凰小学模版 –filename d:\fenghuangxiaoxue.stp

 

 

MOSS部署常用的stsadm命令行

 

常用的stsadm命令行参数有:

1、installfeature、uninstallfeature:feature部署和卸载;

     安装feature:stsadm -o installfeature -filename [feature文件夹下]\feature.xml

     激活feature:stsadm -o activatefeature -filename [feature路径]\feature.xml -url http://[主机标头]:[端口]/sites/portol  -force

          特别注意的地方 -url

    还有就是:“主机标头”可以不是计算机名,但是有时创建Web Application时会出错,所以还是用计算机名比较好。也不知到为什么会出错。

2、addwppack、deletewppack:webpart和*.cab部署和卸载;

     安装:stsadm -o addwppack -filename [*.cab文件路径]\*.cab

     卸载:stsadm -o deletewppack -name *.cab

     一般情况下,webpart不要直接部署到网站里,用feature部署要好一些。

3、addtemplate、deleteremplate:template(模板)的部署和卸载;

     安装:stsadm.exe -o addtemplate -filename  [*.stp文件路径]\*.stp -title [template名称]

4、addsolution、deletesolution:solution部署和卸载;

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

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

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

 Feature功能很强大,很多东西都可以通过feature部署到MOSS里,但是根据自己的使用情况,个人感觉母板页(MasterPage)和模板(template)还是通过“母板页库”和“模板库”上传上去比较好用。

5、Solution的部署与删除:

   部署:

   A.把.stp 和.wsp文件直接放在c:\目录下

打开“命令提示符”窗口,输入:

 

cd  C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

 

   B.安装solution

stsadm -o addsolution -filename c:\MeetingTemplate.wsp

 

   C.部署deploysolution

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

 

   如果部署的是aspx页面,DLL会自动部到GAC里,aspx页面也会自动部到Layouts下。

   删除

   A.retractsolution

stsadm.exe -o retractsolution  -name MeetingTemplate.wsp -immediate

 

   B.deletesolution

stsadm.exe -o deletesolution -name MeetingTemplate.wsp

也可以强制删除  [-override]

6.激活feature

stsadm -o activatefeature -filename MeetingTemplate\feature.xml -url http://test:9001/sites/portail  -force

特别注意的地方 -url

7、getlock、setlock:用于在备份backup site collection时访问限制;

Limit access to the site collection during backup(转载)

 

At a command prompt on the drive on which SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin.


To determine the current access level of the site, type the following command, and then press ENTER:

stsadm -o getsitelock -url <URL name>

where URL name is the URL of the site collection that you want to back up. For more information, see Getsitelock: Stsadm operation (Office SharePoint Server).


If the current access level allows changes to the site content, change it to read-only by typing the following command, and then pressing ENTER:

stsadm -o setsitelock -url <URL name> -lock readonly

where URL name is the URL of the site collection that you want to back up. For more information, see Setsitelock: Stsadm operation (Office SharePoint Server).


When the backup is complete, use this procedure to return access to the site collection to the original setting determined in step 1.


Use this procedure to back up a site collection by using the Stsadm command-line tool.

Important: 

Membership in the Administrators group on the local computer is the minimum required to complete this procedure.
 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值