Install applications with the wsadmin tool

 

Install applications with the wsadmin tool

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 commandarticle for more information.

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 a set of options. See the Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands article for a list of valid options for the install and installinteractive commands. 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()
For more information for the options , install, or installinteractive commands, see the Commands for the AdminApp object article.

The application that you install must be an enterprise archive file (EAR), a Web archive (WAR) file, or a Java archive (JAR) file. The archive file must end in .ear, .jar 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:

  1. Install the application.

    • Using 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 /home/myProfile/MyStuff/application1.ear {-server serv2}

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

        • Using Jython string:
          AdminApp.install('/home/myProfile/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 /home/myProfile/MyStuff/application1.ear {-cluster cluster1}

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

        • Using Jython string:
          AdminApp.install('/home/myProfile/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

    • Using interactive mode, the following command changes the application information by prompting you through a series of installation tasks:

      • Using Jacl:
        $AdminApp installInteractive /home/myProfile/MyStuff/application1.ear

      • Using Jython:
        AdminApp.installInteractive('/home/myProfile/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

  2. Save the configuration changes. See the Saving configuration changes with the wsadmin tool article for more information.

  3. In a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.



Related concepts
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