Oracle GlassFish Server 3.0.1 Administration Guide

ProcedureTo Configure a GlassFish Server Installation to Use a Local Repository Server Inside a Closed Network

Each GlassFish Server installation that will be updated inside a closed network must be configured to use a local repository server instead of the default public repository servers.

Before You Begin

This procedure must be completed on each GlassFish Server installation on which updates will be performed inside the closed network.

Ensure that the following conditions are met:

  1. Set the http_proxy environment variable for the local repository server, if necessary.

    This step is required if a proxy is needed to access the local repository from within the closed network.


    export http_proxy=proxy-host:port
    
    proxy-host

    The fully qualified URL for the proxy host.

    port

    The port on which the proxy-host listens.

  2. Change to the GlassFish Server installation directory.


    cd as-install
    
    as-install

    The path to the directory that contains the GlassFish Server installation that is to be updated.


    Note –

    The remainder of this procedure must be performed from within the GlassFish Server installation directory.


  3. Use the pkg command in the Pre-Installed Image Toolkit installation directory to tell the GlassFish Server installation to use the local repository server.


    toolkit-dir/pkg/bin/pkg -R as-install set-publisher -Pe -O http://repo-host:port publisher
    
    toolkit-dir

    The directory that contains the unzipped Pre-Installed Toolkit Image.

    as-install

    The path to the directory that contains the GlassFish Server installation that is to be updated.

    repo-host

    The name of the server on which the pkg.depotd repository server daemon is running.

    port

    The port used for the pkg.depotd daemon, as specified in To Configure a Local Repository Server Inside a Closed Network.

    publisher

    The name of the preconfigured GlassFish Server publisher. For GlassFish Server, use release.glassfish.sun.com as the publisher.

  4. (Optional) Verify that the local GlassFish Server repository is configured correctly.


    toolkit-dir/pkg/bin/pkg publisher
    

    The name of the of the local server repository and publisher should be listed, as shown in the following example.


Example 10–2 Configuring the pkg Command to Use a Local Repository

This example configures a GlassFish Server installation to use a local repository server. The following parameters are used:

/opt/glassfish

The GlassFish Server installation directory.

/opt/toolkit

The Pre-Installed Toolkit Image directory.

repohost

The host name of the local repository server.

30000

The port number used by the repository server.


/opt/toolkit/pkg/bin/pkg -R /opt/glassfish set-publisher -P --enable \
-O http://repohost:30000 release.glassfish.sun.com
# /opt/toolkit/pkg/bin/pkg publisher
PUBLISHER                             TYPE     STATUS   URI
release.glassfish.sun.com (preferred)  origin   online   http://repohost:30000/