This chapter explains how to extend and update a deployed Oracle GlassFish Server 3.0.1 installation.
The following topics are addressed here:
Upgrading to Oracle GlassFish Server From GlassFish Server Open Source Edition
Extending and Updating GlassFish Server Inside a Closed Network
GlassFish Server is designed to provide its functionality in a modular form so that you can choose to include the functionality that you need and leave out the functionality that is not needed. OSGi modules, also called bundles, provide add-on functionality for your deployed GlassFish Server. As new add-on components are developed and existing components are modified, you can extend and update GlassFish Server by installing these components. You can add components during runtime, without stopping the server. But you must stop the server before updating or removing an installed component.
Image Packaging System (IPS) tools for updating GlassFish Server software obtain updates from repositories that contain the OSGi modules and other content for GlassFish Server.
Oracle GlassFish Server and GlassFish Server Open Source Edition each have their own set of repositories, as explained in the following sections:
Table 10–1 lists the preconfigured repositories for Oracle GlassFish Server.
Table 10–1 Oracle GlassFish Server Preconfigured Repositories
Publisher |
URL |
Description |
---|---|---|
pkg.sun.com/glassfish/v3/release/ |
Commercial, production quality versions of the core components and add-on components of Oracle GlassFish Server |
|
pkg.sun.com/glassfish/v3/contrib/ |
Additional add-on components that are contributed by Oracle partners |
|
pkg.glassfish.org/v3/contrib/ |
Additional add-on components that are contributed by the GlassFish community |
|
pkg.sun.com/glassfish/v3/dev/ |
Developmental, beta, and prerelease versions of the components in the pkg.sun.com/glassfish/v3/release/ repository |
For Oracle GlassFish Server installations, the release.glassfish.sun.com publisher is designated as the preferred publisher. To ensure that installations contain only commercial, production quality version of components by default, the preferred publisher is treated specially by the tools for updating GlassFish Server software:
If an add-on component is available from the preferred publisher and from other publishers, the Update Tool GUI and the pkg CLI list and install the component from the preferred publisher.
After a component has been installed from the preferred publisher, the Update Tool, Software Update, and desktop notifier GUIs search for updates to that component only from the preferred publisher.
If you have support for Oracle GlassFish Server, you can acquire an SSL certificate and key to change the preferred publisher's repository URL from pkg.sun.com/glassfish/v3/release/ to pkg.sun.com/glassfish/v3/support/. This repository provides more frequent commercial, production quality updates. For more information, see the pkg.sun.com Certificate Generator.
Table 10–2 lists the preconfigured repositories for GlassFish Server Open Source Edition.
Table 10–2 GlassFish Server Open Source Edition Preconfigured Repositories
Publisher |
URL |
Description |
---|---|---|
pkg.sun.com/javaeesdk/6/release/ |
Production quality versions of the core components and add-on components of GlassFish Server Open Source Edition |
|
pkg.glassfish.org/v3/stable/ |
Most current stable pre-release build of core and add-on components |
|
pkg.sun.com/glassfish/v3/contrib/ |
Additional add-on components that are contributed by Oracle partners |
|
pkg.glassfish.org/v3/contrib/ |
Additional add-on components that are contributed by the GlassFish community |
|
pkg.glassfish.org/v3/dev/ |
Developmental, beta, and prerelease versions of the components in the pkg.sun.com/javaeesdk/6/release/ repository |
For GlassFish Server Open Source Edition installations, stable.glassfish.org is the preferred publisher.
GlassFish Server provides the following tools for updating software on a deployed server:
Update Tool is a standalone graphical tool bundled with GlassFish Server that can be used to find and install updates and add-ons on a deployed GlassFish Server instance.
To start Update Tool, type the following command:
as-install-parent/bin/updatetool |
For instructions for using Update Tool, see the Update Tool online help.
For additional information about Update Tool, see the following wikis:
The pkg command is the command-line equivalent to Update Tool. Most of the tasks that can be performed with the graphical Update Tool can be performed from a command line using the pkg tool.
The pkg command is located in the as-install-parent/bin directory. To run the pkg command without specifying the path, ensure that this directory is in your path.
The pkg command enables you to create update scripts and to update software on headless systems. A headless system does not have a monitor, graphics card, or keyboard.
Most of the procedures in this chapter are based on the pkg command. A set of reference pages that contain details about using the pkg command is included with GlassFish Serverin the as-install-parent/pkg/man directory.
The Administration Console enables you to perform the following tasks that are related to extending and updating GlassFish Server:
Installing add-on components
Viewing available updates to installed components
Viewing installed components
For more information, see the Administration Console online help.
The Administration Console does not enable you to update or remove installed components. Instead, you must stop the GlassFish Server domain and use Update Tool or the pkg command.
This section provides instructions for using the pkg command to install GlassFish Server add-on components on your deployed GlassFish Server.
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,
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.
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.
To ensure that the pkg command can locate the application image, change to the base installation directory for GlassFish Server.
cd as-install |
The base installation directory for GlassFish Server.
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 ----
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 ----
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
To apply your changes, restart GlassFish Server.
See To Restart a Domain.
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.
This section provides the following instructions for updating GlassFish Server components after they have been installed:
When you install an updated version of a component, only those files that have been modified are downloaded and installed. Files that have been removed in the updated package are removed during the update process.
Stop GlassFish Server.
See To Stop a Domain.
To ensure that the pkg command can locate the application image, change to the base installation directory for GlassFish Server.
cd as-install |
The base installation directory for GlassFish Server.
Obtain a list of only the installed packages that have available updates:
pkg list -u |
Information similar to the following is displayed:
NAME (AUTHORITY) VERSION STATE UFIX glassfish-ejb 3.0.1-14 installed u--- glassfish-hk2 3.0.1-14 installed u--- glassfish-jca 3.0.1-14 installed u--- glassfish-jcdi 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--- jersey 1.1.5-1.0 installed u--- metro 2.0-29 installed u---
Install a new version of a package.
pkg install package-name |
For example:
pkg install metro |
Information similar to the following is displayed:
DOWNLOAD PKGS FILES XFER (MB) Completed 1/1 5/5 0.49/0.49 PHASE ACTIONS Removal Phase 2/2 Update Phase 7/7 Install Phase 2/2
Start GlassFish Server.
See To Start a Domain.
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.
GlassFish Server enables you to maintain multiple installation images on a single system. When you update an installation image, all the components that are present in that image are updated to new versions, if new versions are available. When you install updated versions of components, only those files that have been modified are downloaded and installed. Files that have been removed in the updated package are removed during the update process.
Stop GlassFish Server.
See To Stop a Domain.
To ensure that the pkg command can locate the application image, change to the base installation directory for GlassFish Server.
cd as-install |
The base installation directory for GlassFish Server.
Install all packages for the image.
pkg image-update |
Information similar to the following is displayed:
DOWNLOAD PKGS FILES XFER (MB) Completed 6/6 729/729 21.59/21.59 PHASE ACTIONS Removal Phase 887/887 Update Phase 253/253 Install Phase 584/584
Start GlassFish Server.
See To Start a Domain.
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.
If you are discontinuing use of a component and want to remove it from your system, you can do this by using the uninstall command. If you need to revert to a prior version of a component, you will need to uninstall the current version and install the prior version by specifying the version number.
Stop GlassFish Server.
See To Stop a Domain.
To ensure that the pkg command can locate the application image, change to the base installation directory for GlassFish Server.
cd as-install |
The base installation directory for GlassFish Server.
Obtain a list of all your installed components.
pkg list |
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 ----
Uninstall the component that you want to remove from your system.
pkg uninstall package-name |
For example:
pkg uninstall jruby |
Start GlassFish Server.
See To Restart a Domain.
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.
If there is a malfunction in an installed component, you might want to revert to an older version of that component. The way to restore an older version of a component is to first uninstall the current version of the component, then install the specific older version that you want to reinstate.
Be sure to verify that the older version of the component is in the repository before you uninstall your current version.
Stop GlassFish Server.
See To Stop a Domain.
To ensure that the pkg command can locate the application image, change to the base installation directory for GlassFish Server.
cd as-install |
The base installation directory for GlassFish Server.
Verify that the older version of the component is still available:
pkg list -fa pkg-name |
For example:
pkg list -fa jersey NAME (PUBLISHER) VERSION STATE UFIX jersey 1.1.5-1.0 installed ---- jersey 1.1.4.1-1.0 known u--- jersey 1.1.4.1-1.0 known u--- jersey 1.1.4.1-1.0 known u--- |
Obtain a list of your installed components:
pkg list |
Uninstall the currently-installed component that you want to replace.
pkg uninstall package-name |
For example:
pkg uninstall jersey |
Install the older version of the component.
pkg install package-name@version |
For example:
pkg install jersey@0.7-0.2 |
Verify that the older version is installed:
pkg list |
Start GlassFish Server.
See To Start a Domain.
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.
Oracle provides software support only for Oracle GlassFish Server, not for GlassFish Server Open Source Edition. Additionally, some features of Oracle GlassFish Server are not available in GlassFish Server Open Source Edition.
If you are using GlassFish Server Open Source Edition, you can upgrade to Oracle GlassFish Server by purchasing a right-to-use and installing the add-on component for upgrading GlassFish Server Open Source Edition. To obtain this component, and to ensure the reliability of your upgraded installation, you must configure your GlassFish Server installation to obtain updates from the appropriate repositories.
To use Oracle GlassFish Server in production after the upgrade, you must obtain a right to use this software from Oracle.
You can upgrade to Oracle GlassFish Server by using either Update Tool or the pkg command.
The procedure explains how to use Update Tool to obtain and install the add-on component for upgrading GlassFish Server Open Source Edition to Oracle GlassFish Server. For general instructions for using Update Tool, see the Update Tool online help.
Ensure that GlassFish Server Open Source Edition 3.0.1 is installed on your machine.
Start Update Tool.
as-install-parent/bin/updatetool |
From the Application Images list, select GlassFish Server Open Source Edition.
Click Edit Properties.
The Image Properties window opens.
(Optional) In the Image Properties window, change image title to Oracle GlassFish Server.
Remove the following publishers from the list of software sources for the image:
dev.glassfish.org
stable.glassfish.org
release.javaeesdk.sun.com
Remove each publisher as follows:
Add repositories for Oracle GlassFish Server to the application image.
Add each repository as follows:
In the Image Properties window, click Add.
The Publisher Properties window opens.
In the Publisher Properties window, specify the properties of the repository that you are adding and click OK.
The properties to specify for each repository are listed in the following table.
Publisher Name |
Repository URL |
---|---|
release.glassfish.sun.com |
http://pkg.sun.com/glassfish/v3/release/ |
dev.glassfish.sun.com |
http://pkg.sun.com/glassfish/v3/dev/ |
For more information about these repositories, see Oracle GlassFish Server Repositories.
The Publisher Properties window closes. The publisher is added to the Software Sources list in the Image Properties window.
In the Image Properties window, set the Preferred option for the release.glassfish.sun.com publisher and click OK.
The Image Properties window closes.
Under GlassFish Server Open Source Edition in the Available Images list, select Available Add-ons.
Select the add-on component for upgrading the distribution of GlassFish Server Open Source Edition that is installed:
Click Install.
To apply your changes, restart GlassFish Server.
See To Restart a Domain.
Ensure that GlassFish Server Open Source Edition 3.0.1 is installed on your machine.
To ensure that the pkg command can locate the application image, change to the base installation directory for GlassFish Server.
cd as-install |
The base installation directory for GlassFish Server.
Remove the following publishers from the list of publishers for the image:
dev.glassfish.org
stable.glassfish.org
release.javaeesdk.sun.com
pkg unset-publisher dev.glassfish.org stable.glassfish.org \ release.javaeesdk.sun.com |
Add repositories for Oracle GlassFish Server to the application image.
The properties to specify for each repository are listed in the following table.
Publisher Name |
Origin Uniform Resource Indentifier (URI) |
---|---|
release.glassfish.sun.com |
http://pkg.sun.com/glassfish/v3/release/ |
dev.glassfish.sun.com |
http://pkg.sun.com/glassfish/v3/dev/ |
The publisher release.glassfish.sun.com must be the preferred publisher.
For more information about these repositories, see Oracle GlassFish Server Repositories.
Add the repository whose publisher is release.glassfish.sun.com, which must be the preferred publisher.
pkg set-publisher -P -O http://pkg.sun.com/glassfish/v3/release/ \ release.glassfish.sun.com |
Add the repository whose publisher is dev.glassfish.sun.com.
pkg set-publisher -O http://pkg.sun.com/glassfish/v3/dev/ \ dev.glassfish.sun.com |
Install the add-on component for upgrading the distribution of GlassFish Server Open Source Edition that is installed:
If the Web Profile distribution is installed, install the Oracle GlassFish Server Web Profile add-on component.
pkg install glassfish-enterprise-web-profile |
If the Full Platform distribution is installed, install the Oracle GlassFish Server Full Platform add-on component.
pkg install glassfish-enterprise-full-profile |
To apply your changes, restart GlassFish Server.
See To Restart a Domain.
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.
GlassFish Server might be installed on a machine without an Internet connection. For example, for security reasons, GlassFish Server might be installed behind a restrictive firewall, or it might be installed on a LAN that is physically isolated from other networks. In such situations, neither the graphical Update Tool nor the pkg command-line utility that are included with GlassFish Server can contact a public repository server to download and install updates. Therefore, a local repository server must be configured inside the closed network and the GlassFish Server updates installed from there.
The following topics are addressed here:
Installing the Pre-Installed Toolkit Image inside a closed network
The Pre-Installed Toolkit Image provides the software components that are required to run a local repository server inside a closed network.
Configuring and running a local repository server on a locally accessible host
A local repository server makes it possible for a GlassFish Server installation to obtain packages and updates from inside a closed network rather than from the default public repository servers.
Configuring a GlassFish Server installation to obtain updates from the local repository server
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.
Installing the GlassFish Server updates
The GlassFish Server updates inside the closed network are performed normally, but use the local repository server instead of the public repository servers.
The Pre-Installed Toolkit Image provides the software components that are required to configure and run a local repository server inside a closed network. Running a local repository server makes it possible for a GlassFish Server installation to obtain packages and updates from within the closed network rather than from the default public GlassFish Server repositories.
The first three steps of this procedure require access to a machine that is connected to the Internet. This machine must also be able to write to some type of removable medium, such as CD, DVD, USB drive, or flash memory card.
The remaining steps in the procedure are performed on the machines that are inside the closed network, and do not require access to an Internet connection.
In a Web browser on the machine that is connected to the Internet, open the Pre-installed Toolkit Images and Starter Repositories page.
Download the ZIP file that contains the Pre-Installed Toolkit Image that is correct for your server's operating system and save it to the location of your choice.
The ZIP files are named according to operating system and architecture, using the following format:
pkg-toolkit-2.3.2-platform-arch.zip |
For example, the ZIP file for 32–bit Linux operating systems is named:
pkg-toolkit-2.3.2-linux-i386.zip |
Download the correct ZIP file for the operating system and architecture on each of the following machines:
The machine on which the local repository server will be run
Each machine on which one or more GlassFish Server installations will be updated inside the closed network
Copy each Pre-Installed Toolkit Image ZIP file to a removable medium that you can physically transport to the machines inside the closed network.
Copy the correct Pre-Installed Toolkit Image ZIP file for each operating system from the removable medium to the directories of your choice on the following machines:
The machine on which the local repository server will be run
Each machine on which one or more GlassFish Server installations will be updated inside the closed network
Unzip the Pre-Installed Toolkit Image ZIP file on each machine to which you copied the ZIP file in the preceding step.
The size of the expanded Pre-Installed Toolkit Image ZIP file depends on the operating system:
On Windows systems, the expanded ZIP file is approximately 11 Mbytes.
On Linux and Solaris systems, the expanded ZIP file is approximately 13 Mbytes.
(Optional) On each machine to which you copied the Pre-Installed Toolkit Image, verify that the pkg command-line tool is correctly installed.
Change to the pkg/bin subdirectory of the directory that contains the unzipped Pre-Installed Toolkit Image.
cd toolkit-dir/pkg/bin |
The directory that contains the unzipped Pre-Installed Toolkit Image.
Display the pkg version.
./pkg version |
Output similar to the following is displayed:
1.122.2-38.2791 |
A local repository server makes it possible for a GlassFish Server installation to obtain packages and updates from within a closed network, rather than from the default public repository servers.
Ensure that the following conditions are met:
You have access to a machine that is connected to the Internet.
The machine that is connected to the Internet can write to some type of removable medium, such as CD, DVD, USB drive, or flash memory card.
The Pre-Installed Toolkit Image has been installed as described in To Install the Pre-Installed Toolkit Image Inside a Closed Network.
In a Web browser on the machine that is connected to the Internet, download the ZIP file that contains the GlassFish Server repository for the operating system on which GlassFish Server is running.
The repository ZIP files for GlassFish Server are distributed as patches through the SunSolve Web site.
Log in to the SunSolve site.
Navigate to the Patch Finder page.
Enter the desired patch number in the Patch ID field and then click Search.
Operating System |
Patch ID |
---|---|
sunos-sparc |
145091 |
sunos-i386 |
145092 |
linux-i386 |
145093 |
windows-i386 |
145094 |
mac-universal |
145095 |
A list of patches appears at the bottom of the page.
Download the ZIP file for the latest version of the desired patch.
Copy each ZIP file that you downloaded from SunSolve onto a removable medium that you can physically transport to the local repository server.
Each SunSolve ZIP file is approximately 270 Mbytes in size.
Copy each SunSolve ZIP file from the removable medium to the local repository server machine.
The directory used for the SunSolve ZIP files should be different than the directory in which the Pre-Installed Toolkit Image was copied, as described in To Install the Pre-Installed Toolkit Image Inside a Closed Network.
Unzip each SunSolve ZIP file that you copied in the preceding step.
The SunSolve ZIP files are wrappers that contain a GlassFish Server repository ZIP file, a README file, and a license file. For example, the SunSolve ZIP file for Linux contains the following files:
LEGAL_LICENSE.TXT README.145093-01 ogs-3.0.1-repo-linux-i386.zip |
In this example, the GlassFish Server repository ZIP file is named ogs-3.0.1-repo-linux-i386.zip.
On the local repository server machine, start the repository server daemon.
Change to the Pre-Installed Toolkit Image pkg/bin directory.
cd toolkit-dir/pkg/bin |
The directory that contains the unzipped Pre-Installed Toolkit Image.
Start the pkg.depotd daemon.
./pkg.depotd -d repository-dir -p port |
The directory that contains the unzipped GlassFish Server repository.
Your choice of port number for requests to the repository server. The default is 80.
Several startup messages are displayed as the repository daemon initializes, as shown in the following example.
This example starts the pkg.depotd daemon using the following parameters:
The name of the Pre-Installed Toolkit Image directory.
The GlassFish Server repository directory.
The port number used by the local repository daemon.
./pkg.depotd -d /opt/145093-01/linux-i386/ -p 30000 [ Jun 15 08:06:38 ] ENGINE Listening for SIGHUP. [ Jun 15 08:06:38 ] ENGINE Listening for SIGTERM. [ Jun 15 08:06:38 ] ENGINE Listening for SIGUSR1. [ Jun 15 08:06:38 ] ENGINE Bus STARTING [ Jun 15 08:06:38 ] ENGINE Started monitor thread '_TimeoutMonitor'. [ Jun 15 08:06:38 ] ENGINE Serving on 0.0.0.0:30000 [ Jun 15 08:06:38 ] ENGINE Bus STARTED |
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.
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:
The Pre-Installed Toolkit Image is installed on each machine on which one or more GlassFish Server installations will be upgraded, as described in To Install the Pre-Installed Toolkit Image Inside a Closed Network
The local repository server is configured, as described in To Configure a Local Repository Server Inside a Closed Network
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 |
The fully qualified URL for the proxy host.
The port on which the proxy-host listens.
Change to the GlassFish Server installation directory.
cd as-install |
The path to the directory that contains the GlassFish Server installation that is to be updated.
The remainder of this procedure must be performed from within the GlassFish Server installation directory.
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 |
The directory that contains the unzipped Pre-Installed Toolkit Image.
The path to the directory that contains the GlassFish Server installation that is to be updated.
The name of the server on which the pkg.depotd repository server daemon is running.
The port used for the pkg.depotd daemon, as specified in To Configure a Local Repository Server Inside a Closed Network.
The name of the preconfigured GlassFish Server publisher. For GlassFish Server, use release.glassfish.sun.com as the publisher.
(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.
This example configures a GlassFish Server installation to use a local repository server. The following parameters are used:
The GlassFish Server installation directory.
The Pre-Installed Toolkit Image directory.
The host name of the local repository server.
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/ |
After configuring a GlassFish Server installation to use a local repository server, as described in the previous procedures in this section, GlassFish Server updates inside a closed network are performed normally. The only difference is that the GlassFish Server installation being updated inside the closed network will use a local repository server instead of the public repository servers.
Perform the following procedure on each GlassFish Server installation that will be updated.
Ensure that each GlassFish Server installation that will be updated is configured to use the local repository server, as described in To Configure a GlassFish Server Installation to Use a Local Repository Server Inside a Closed Network.
Stop GlassFish Server.
See To Stop a Domain.
Change to the GlassFish Server installation directory.
cd as-install |
The remainder of this procedure must be performed from within the GlassFish Server installation directory.
Use either the graphical Update Tool or the pkg command-line utility to perform the desired updates.
For detailed instructions on updating or installing GlassFish Server components, see Updating Installed Components.
Start GlassFish Server.
See To Restart a Domain.