Oracle GlassFish Server 3.0.1 Administration Guide

ProcedureTo Install an Add-on Component

The pkg command enables you to install an add-on component on your system. If multiple versions of a package are available, the latest one is applied unless you specify otherwise. The pkg command, located in the as-install-parent/bin directory,


Note –

If the pkg component, the updatetool component, or any other valid component that you try to invoke from the command line is not yet installed on your deployed GlassFish Server, you will receive a query asking if you want to install the component. Answer Y to install the component.


Before You Begin

GlassFish Server 3.0.1 must be fully deployed before you can install additional components. If you need installation instructions, see Oracle GlassFish Server 3.0.1 Installation Guide.

  1. To ensure that the pkg command can locate the application image, change to the base installation directory for GlassFish Server.


    cd as-install
    
    as-install

    The base installation directory for GlassFish Server.

  2. List your installed components:


    pkg list
    

    Information similar to the following is displayed:

    NAME (PUBLISHER)                              VERSION         STATE      UFIX
    felix                                         2.0.2-0         installed  u---
    glassfish-appclient                           3.0.1-14        installed  u---
    glassfish-cmp                                 3.0.1-14        installed  u---
    glassfish-common                              3.0.1-14        installed  u---
    glassfish-common-full                         3.0.1-14        installed  u---
    glassfish-corba                               3.0.0-41        installed  u---
    glassfish-corba-base                          3.0.0-41        installed  u---
    glassfish-ejb                                 3.0.1-14        installed  u---
    glassfish-ejb-lite                            3.0.1-14        installed  u---
    glassfish-full-incorporation                  3.0.1-14        installed  u---
    glassfish-full-profile                        3.0.1-14        installed  u---
    glassfish-grizzly                             1.9.18-9        installed  u---
    glassfish-grizzly-full                        1.9.18-9        installed  u---
    glassfish-gui                                 3.0.1-14        installed  u---
    glassfish-hk2                                 3.0.1-14        installed  u---
    glassfish-javahelp                            2.0.2-0         installed  u---
    glassfish-jca                                 3.0.1-14        installed  u---
    glassfish-jcdi                                3.0.1-14        installed  u---
    glassfish-jdbc                                3.0.1-14        installed  u---
    glassfish-jms                                 3.0.1-14        installed  u---
    glassfish-jpa                                 3.0.1-14        installed  u---
    glassfish-jsf                                 2.0.2-10        installed  u---
    glassfish-jta                                 3.0.1-14        installed  u---
    glassfish-jts                                 3.0.1-14        installed  u---
    glassfish-management                          3.0.1-14        installed  u---
    glassfish-nucleus                             3.0.1-14        installed  u---
    glassfish-registration                        3.0.1-14        installed  u---
    glassfish-scripting                           3.0.1-14        installed  u---
    glassfish-upgrade                             3.0.1-14        installed  u---
    glassfish-web                                 3.0.1-14        installed  u---
    glassfish-web-incorporation                   3.0.1-14        installed  u---
    glassfish-web-profile                         3.0.1-14        installed  u---
    javadb-client                                 10.5.3.0-1      installed  ----
    javadb-common                                 10.5.3.0-1      installed  ----
    javadb-core                                   10.5.3.0-1      installed  ----
    jersey                                        1.1.5-1.0       installed  u---
    metro                                         2.0-29          installed  u---
    mq-bin-exe                                    4.4.2-2.7       installed  ----
    mq-bin-sh                                     4.4.2-2.7       installed  ----
    mq-config-gf                                  4.4.2-2.7       installed  ----
    mq-core                                       4.4.2-2.7       installed  ----
    mq-server                                     4.4.2-2.7       installed  ----
    pkg                                           1.122.2-38.2493 installed  ----
    pkg-java                                      1.122-38.2493   installed  ----
    pkg-toolkit-incorporation                     2.3.0-38.2493   installed  ----
    python2.4-minimal                             2.4.4.0-38.2493 installed  ----
  3. List all packages that are available:


    pkg list -a
    

    Information similar to the following is displayed from the repository. For clarity, some items are omitted from this example.

    NAME (PUBLISHER)                              VERSION         STATE      UFIX
    ant (contrib.glassfish.org)                   1.7.1-0.6       known      ----
    felix (dev.glassfish.org)                     2.0.2-0         known      ----
    felix                                         2.0.2-0         installed  u---
    felix (release.glassfish.sun.com)             2.0.2-0         known      u---
    glassfish-appclient (dev.glassfish.org)       3.0.1-15        known      ----
    glassfish-appclient                           3.0.1-14        installed  u---
    glassfish-appclient (release.glassfish.sun.com) 3.0-74.2        known      u---
    glassfish-branding (release.glassfish.sun.com) 3.0-74.2        known      ----
    glassfish-branding-gui (release.glassfish.sun.com) 3.0-74.2        known      ----
    glassfish-cluster-util (contrib.glassfish.org) 1.0-0.0         known      ----
    glassfish-cmp (dev.glassfish.org)             3.0.1-15        known      ----
    glassfish-cmp                                 3.0.1-14        installed  u---
    glassfish-cmp (release.glassfish.sun.com)     3.0-74.2        known      u---
    ...
    metro (dev.glassfish.org)                     2.0.1-3         known      ----
    metro                                         2.0-29          installed  u---
    metro (release.glassfish.sun.com)             2.0-29          known      u---
    mq-bin-exe                                    4.4.2-2.7       installed  ----
    mq-bin-exe (dev.glassfish.org)                4.4.2-2.7       known      ----
    mq-bin-exe (release.glassfish.sun.com)        4.4.1-7.2       known      u---
    mq-bin-sh                                     4.4.2-2.7       installed  ----
    mq-bin-sh (dev.glassfish.org)                 4.4.2-2.7       known      ----
    mq-bin-sh (release.glassfish.sun.com)         4.4.1-7.2       known      u---
    mq-branding (release.glassfish.sun.com)       4.4.1-7.2       known      ----
    mq-config-gf                                  4.4.2-2.7       installed  ----
    mq-config-gf (dev.glassfish.org)              4.4.2-2.7       known      ----
    mq-config-gf (release.glassfish.sun.com)      4.4.1-7.2       known      u---
    mq-core                                       4.4.2-2.7       installed  ----
    mq-core (dev.glassfish.org)                   4.4.2-2.7       known      ----
    mq-core (release.glassfish.sun.com)           4.4.1-7.2       known      u---
    mq-docs (dev.glassfish.org)                   4.4.2-2.7       known      ----
    mq-docs                                       4.4.1-7.2       known      u---
    mq-docs (release.glassfish.sun.com)           4.4.1-7.2       known      u---
    mq-locale (dev.glassfish.org)                 4.4.2-2.7       known      ----
    mq-locale                                     4.4.1-7.2       known      u---
    mq-locale (release.glassfish.sun.com)         4.4.1-7.2       known      u---
    mq-server                                     4.4.2-2.7       installed  ----
    mq-server (dev.glassfish.org)                 4.4.2-2.7       known      ----
    mq-server (release.glassfish.sun.com)         4.4.1-7.2       known      u---
    ...
    sdk-branding-full (release.glassfish.sun.com) 3.0-74.2        known      ----
    sdk-branding-web (release.glassfish.sun.com)  3.0-74.2        known      ----
    sun-javaee-engine (dev.glassfish.org)         3.0.1-15        known      ----
    sun-javaee-engine                             3.0-74.2        known      u---
    updatetool                                    2.3.0-38.2493   known      ----
    updatetool (dev.glassfish.org)                2.3.0-38.2493   known      ----
    updatetool (release.glassfish.sun.com)        2.3.0-38.2493   known      ----
    wxpython2.8-minimal                           2.8.10.1-38.2493 known      ----
    wxpython2.8-minimal (dev.glassfish.org)       2.8.10.1-38.2493 known      ----
    wxpython2.8-minimal (release.glassfish.sun.com) 2.8.10.1-38.2493 known      ----
    wxpython2.8-minimal                           2.8.7.1-8.724   known      ----
  4. Install a package from the available packages list.


    pkg install package-name
    

    For example:


    pkg install javadb
    

    The most recent version of the component is installed and information similar to the following is displayed:

    DOWNLOAD                                     PKGS       FILES     XFER (MB)
    javadb                                       0/1      61/200     2.10/7.26 
    
    PHASE                                        ACTIONS
    Install Phase                                222/222 
  5. To apply your changes, restart GlassFish Server.

    See To Restart a Domain.

See Also

For the full syntax and options of the pkg command, see the pkg(1) man page. This man page is installed only after the pkg utilities have been fully installed.

To view this man page on UNIX and Linux systems, type the following command in a terminal window:

man -M as-install-parent/pkg/man/ pkg

To view this man page on Windows systems, use the type command to view the file as-install-parent\pkg\man\cat1\pkg.1.