MOSS常用部署命令stsadm

來源:互聯網
上載者:User

From : http://blog.sina.com.cn/s/blog_64bdb8240100nyg5.html

 

以下命令須在C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN下運行,而且必須是管理員身份!

 

常用的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;

    eg:   stsadm -o
addsolution -filename C:\Users\zhaoming\Desktop\westaport\模版頁\集團門戶網站模板.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時訪問限制;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.