Deploy common stsadm command lines in MOSS

Source: Internet
Author: User

Common stsadm command line parameters include:
 
1. installfeature and uninstallfeature: deploy and uninstall feature;
 
Install feature: stsadm-o installfeature-filename [in the feature folder] \ feature. xml
 
Activate feature: stsadm-o activatefeature-filename [feature path] \ feature. xml-url http: // [Host Header]: [port]/sites/portol-force
Special note-url
 
In addition, the "Host Header" may not be the computer name, but sometimes an error occurs when you create a Web Application, so it is better to use the computer name. I do not know why an error occurs.
 
2. addwppack, deletewppack: deploy and uninstall webpart and *. cab;
 
Install: stsadm-o addwppack-filename [*. cab file path] \ *. cab
 
Uninstall: stsadm-o deletewppack-name *. cab
 
In general, do not directly deploy the webpart on the website. It is better to deploy the webpart with feature.
 
3. addtemplate and deleteremplate: Deployment and uninstallation of the template;
 
Install: stsadm.exe-o addtemplate-filename [*. stp file path] \ *. stp-title [template Name]
 
4. addsolution and deletesolution: deploy and uninstall solution;
 
Install: stsadm-o addsolution-filename [*. wsp file path] \ *. wsp;
 
Deployment: stsadm-o deploysolution-name *. wsp-allowgacdeployment-immediate
 
Delete: stsadm.exe-o deletesolution-name *. wsp

Feature features are very powerful, and many things can be deployed to MOSS through feature. However, according to your usage, you may feel like MasterPage and template) it is better to upload it through the "Master page library" and "template library.

 
5. Deployment and deletion of Solution:
 
Deployment:
A. Put the. stp and. wsp files directly under the c: \ directory.
 
Open the "command prompt" window and enter:
 
 
 
Cd C: \ Program Files \ Common Files \ Microsoft Shared \ web server extensions \ 12 \ BIN


 
B. Install solution
 
Stsadm-o addsolution-filename c: \ MeetingTemplate. wsp
 
 
 
C. deploysolution

Stsadm-o deploysolution-name MeetingTemplate. wsp-allowgacdeployment-immediate
 
 
If the aspx page is deployed, the DLL will be automatically deployed to GAC, And the aspx page will be automatically deployed to Layouts.

 
Delete
A. retractsolution
 
Stsadm.exe-o retractsolution-name MeetingTemplate. wsp-immediate
 
 
B. deletesolution
 
Stsadm.exe-o deletesolution-name MeetingTemplate. wsp

You can also forcibly Delete [-override]

6.

Activate feature
 
Stsadm-o activatefeature-filename MeetingTemplate \ feature. xml-url http: // test: 9001/sites/portail-force
 
Special note-url

7. getlock and setlock: used for access restrictions when backing up backup site collection;
 
Limit access to the site collection during backup (reproduced)
 

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.

 
 
Examples

A common situation where the getsitelock and setsitelock operations are useful is when a site is backed up. typically, before you back up a site collection, the site shoshould be locked and no users shoshould have access to it.
 
To determine the lock status of the site, you can use the following getsitelock syntax:
 
Stsadm-o getsitelock-url http: // server_name
 
Once the lock status of the site collection is determined, you can use the noaccess parameter of the setsitelock operation to lock out all users to the site:
 
Stsadm-o setsitelock-url http: // server_name-lock noaccess
 
You can use the Backup operation to create a backup of the site collection:
 
Stsadm-o backup-url http: // server_name-filename "filename. bak"-overwrite
 
After the site has been backed up, you can use the none parameter of the setsitelock operation to remove all locks to the site:
 
Stsadm-o setsitelock-url http: // server_name-lock none

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.