WebSphere Application Server Network Deployment, Version 6.0.x   Operating Systems: AIX, HP-UX, Linux, Solaris, Windows
             [TIP: Focusing the table of contents and search results]

Installing applications with the wsadmin tool

You can use the wsadmin tool and scripting to install an application into the run time.

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

On a single server installation, the server must be running before you install an application. See the Starting servers using scripting article for more information.

On a network deployment installation, the deployment manager must be running before you install an application. See the startManager command article for more information.

About this task

The application that you install must be an enterprise archive file (EAR), a Web archive (WAR) file, a servlet archive (SAR), or a Java archive (JAR) file. The archive file must end in .ear, .jar, .sar or .war for the wsadmin tool to be able to install it. The wsadmin tool uses these extensions to figure out the archive type. If the file is a WAR or JAR file, it will be automatically wrapped as an EAR file.

If you are installing an application that has the AdminApp useMetaDataFromBinary option specified, then you can only install this application on a WebSphere Application Server V6.x deployment target. This also applies to editing the application, using the AdminApp edit command, after you install it. If you use the V5.x wsadmin tool to install or edit an application on a WebSphere Application Server V6.x cell, only the steps available for the V5.x wsadmin tool will be shown.

Perform the following steps to install an application into the run time:

Procedure

  1. Determine which options to use to install your application in your configuration.
    For example, if your configuration consists of a node, a cell, and a server, you can specify that information when you enter the install command. Review the list of valid options for the install and installinteractive commands in the Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands topic to locate the correct syntax for the -node, -cell, and -server options. For this configuration, the Jacl command is:
    $AdminApp install "location_of_ear.ear" {-node nodeName -cell cellName -server serverName}

    You can also obtain a list of supported options for an Enterprise Archive (EAR) file using the options command, for example:

    Using Jacl:
    $AdminApp options
    Using Jython:
    AdminApp.options()
  2. Choose to use the install or installInteractive command to install the application.

    You can install the application in batch mode, using the install command, or you can install the application in interactive mode using the installinteractive command. Interactive mode prompts you through a series of tasks to provide information. Both the install command and the installinteractive command support the set of options you chose to use for your installation in the previous step.

  3. Install the application. For this example, only the server option is used with the install command, where the value of the server option is serv2. Customize your install or installInteractive command with on the options you chose based on your configuration.
    • Using the install command to install the application in batch mode:
      • For a single server installation only, the following example uses the EAR file and the command option information to install the application:
        • Using Jacl:

          $AdminApp install "c:/MyStuff/application1.ear" {-server serv2}
        • Using Jython list:

          AdminApp.install('c:/MyStuff/application1.ear', ['-server', 'serv2'])
        • Using Jython string:

          AdminApp.install('c:/MyStuff/application1.ear', '[-server serv2]')
        where:
        $ is a Jacl operator for substituting a variable name with its value
        AdminApp is an object supporting application object management
        install is an AdminApp command
        MyStuff/application1.ear is the name of the application to install
        server is an installation option
        serv2 is the value of the server option
      • For a network deployment installation only, the following command uses the EAR file and the command option information to install the application on a cluster:
        • Using Jacl:

          $AdminApp install "c:/MyStuff/application1.ear" {-cluster cluster1}
        • Using Jython list:

          AdminApp.install('c:/MyStuff/application1.ear', ['-cluster', 'cluster1'])
        • Using Jython string:

          AdminApp.install('c:/MyStuff/application1.ear', '[-cluster cluster1]')
        where:
        $ is a Jacl operator for substituting a variable name with its value
        AdminApp is an object allowing application objects to be managed
        install is an AdminApp command
        MyStuff/application1.ear is the name of the application to install
        cluster is an installation option
        cluster1 the value of the cluster option which will be cluster name
    • Use the installInteractive command to install the application using interactive mode. The following command changes the application information by prompting you through a series of installation tasks:
      • Using Jacl:

        $AdminApp installInteractive "c:/MyStuff/application1.ear"
      • Using Jython:

        AdminApp.installInteractive('c:/MyStuff/application1.ear')
      where:
      $ is a Jacl operator for substituting a variable name with its value
      AdminApp is an object allowing application objects to be managed
      installInteractive is an AdminApp command
      MyStuff/application1.ear is the name of the application to install
  4. Save the configuration changes.
    Using Jacl:
    $AdminConfig save
    Using Jython:
    AdminConfig.save()
  5. In a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.



Related tasks
Using the AdminApp object for scripted administration
Related reference
Commands for the AdminApp object
Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands
Example: Obtaining option information for AdminApp object commands
Task topic    

Terms of Use | Feedback

Last updated: Mar 8, 2007 8:14:28 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_callappinstall.html

© Copyright IBM Corporation 2002, 2006. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)