Sun GlassFish Enterprise Server v3 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 Enterprise Server, you will receive a query asking if you want to install the component. Answer Y to install the component.


Before You Begin

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

  1. List your installed components:


    pkg list
    

    Information similar to the following is displayed:

    NAME (AUTHORITY)                              VERSION         STATE      UFIX
    glassfishv3-common                            0-1             installed  ----
    glassfishv3-ejb                               0-1             installed  u---
    glassfishv3-nucleus                           0-1             installed  ----
    glassfishv3-web                               0-1             installed  ----
    grails                                        1.0-1.0         installed  ----
    jersey                                        0.7-0.1         installed  u---
    jmaki                                         1.8.0-1.0       installed  ----
    jruby                                         1.1.1-1.0       installed  ----
    metro                                         1.2-1           installed  u---
    pkg                                           0.1.4-6.564     installed  u---
    python2.4-minimal                             2.4.4-6.564     installed  u---
    updatetool (glassfish.org)                    2.0-6.564       installed  u---
    wxpython2.8-minimal                           2.8.7.1-6.564   installed  u---
  2. List all packages that are available:


    pkg list -a
    

    Information similar to the following is displayed from the repository:

    NAME (AUTHORITY)                              VERSION         STATE      UFIX
    glassfishv3-common                            0-1             known      u---
    glassfishv3-common                            0-1             known      u---
    glassfishv3-common                            0-1             installed  ----
    glassfishv3-ejb                               0-1             known      u---
    glassfishv3-ejb                               0-1             known      u---
    glassfishv3-ejb                               0-1             known      u---
    glassfishv3-ejb                               0-1             installed  u---
    glassfishv3-ejb                               0-1             known      ----
    glassfishv3-nucleus                           0-1             known      u---
    glassfishv3-nucleus                           0-1             known      u---
    glassfishv3-nucleus                           0-1             installed  ----
    glassfishv3-web                               0-1             known      u---
    glassfishv3-web                               0-1             known      u---
    glassfishv3-web                               0-1             installed  ----
    grails                                        1.0-1.0         installed  ----
    javadb                                        0-1             known      u---
    javadb                                        0-1             known      u---
    javadb                                        0-1             known      ----
    jersey                                        0.7-0.1         installed  u---
    jersey                                        0.7-0.2         known      u---
    jersey                                        0.7-0.3         known      u---
    jersey                                        0.8-0.1         known      ----
    jmaki                                         1.8.0-1.0       installed  ----
    jruby                                         1.1.1-1.0       installed  ----
    metro                                         1.2-1           installed  u---
    metro                                         1.2-2           known      u---
    metro                                         1.2-3           known      ----
    pkg                                           0.1.4-6.564     installed  u---
    pkg                                           0.1.5-8.724     known      ----
    python2.4-minimal                             2.4.4-6.564     installed  u---
    python2.4-minimal                             2.4.4-8.724     known      ----
    updatetool                                    2.0-6.564       installed  u---
    updatetool                                    2.0-8.724       known      ----
    wxpython2.8-minimal                           2.8.7.1-6.564   installed  u---
    wxpython2.8-minimal                           2.8.7.1-8.724   known      ----
  3. Navigate to the as-install directory.

  4. Install a package from the available packages list.

    Use the following syntax: 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 Enterprise Server.

    See To Restart a Domain.

See Also

Full syntax and options for using the pkg command are described in the pages in the as-install/pkg/man/ directory. These reference pages are not displayed by using the man command. Instead, use a command such as more or cat.