Tutorials‎ > ‎

Install the Oracle GlassFish update server for closed networks

Abbreviation Description
 fqdn  Fully qualified domain name (FQDN), sometimes also referred as an absolute domain name
 dns  The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network.

Install the Oracle GlassFish update server for closed networks

Oracle 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 which are included with Oracle 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 Oracle Glassfish Server updates installed from there.

The instructions in chapter need to be performed on the Update server.

Download the pkg-toolkit

Download the (Linux x86) toolkit image at: https://wikis.oracle.com/display/IpsBestPractices/Downloads

Install the pkg-toolkit

To install Oracle Glassfish update server on Red Hat Enterprise Linux run the following command:
yum install screen libidn
cd /opt
unzip pkg-toolkit-2.3-b56-linux-i386.zip
mv pkg-toolkit-linux-i386 toolkit

Check the installation with the commands:
cd /opt/toolkit
bin/pkg version

This will return the version number of the toolkit, e.g. 1.122.2-56.2852.
If the result is something like the output below, then selinux has probably kicked in:
Traceback (most recent call last):
  File "/opt/toolkit/pkg/bin/client.py", line 61, in ?
    import pkg.actions as actions
  File "/opt/toolkit/pkg/vendor-packages/pkg/actions/__init__.py", line 59, in ?
    globals(), locals(), [modname])
  File "/opt/toolkit/pkg/vendor-packages/pkg/actions/hardlink.py", line 38, in ?
    import link
  File "/opt/toolkit/pkg/vendor-packages/pkg/actions/link.py", line 36, in ?
    import generic
  File "/opt/toolkit/pkg/vendor-packages/pkg/actions/generic.py", line 45, in ?
    import pkg.variant as variant
  File "/opt/toolkit/pkg/vendor-packages/pkg/variant.py", line 28, in ?
    from pkg.misc import EmptyI
  File "/opt/toolkit/pkg/vendor-packages/pkg/misc.py", line 32, in ?
    import OpenSSL.crypto as osc
  File "/opt/toolkit/pkg/vendor-packages/OpenSSL/__init__.py", line 11, in ?
    import rand, crypto, SSL, tsafe

Install the Oracle GlassFish server repository

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 Oracle GlassFish Server is running.

The repository ZIP files for GlassFish Server are distributed as patches through the My Oracle Support Web site.
  1. Log in to the https://support.oracle.com site.
  2. Click the Patches & Updates tab.
  3. Enter the desired patch number in the Patch Name or Number field and then click Search. (For information on the patches see: https://blogs.oracle.com/GlassFishForBusiness/)
  4. Download the ZIP file for the latest version of the desired patch.

To install Oracle Server repository on Red Hat Enterprise Linux run the following command:
cd /opt
unzip ${patch_id}.zip
cd ${patch_id}
unzip ogs-${version}-repo-linux-i386.zip

Start the Oracle GlassFish repository as a service

To start the Oracle Glassfish server repository on Red Hat Enterprise Linux as a service:

Download the file "toolkit-initscript.txt" below and save the file as "/etc/init.d/toolkit" and run the following command under sudo or root:
chmod +x /etc/init.d/toolkit
/sbin/chkconfig --add toolkit
/sbin/chkconfig --level 234 toolkit on

groupadd webgroup
useradd -g webgroup -s /bin/bash ${username}
chown -R webuser:webgroup /opt/toolkit
chown -R webuser:webgroup /opt/${patch_id}
service toolkit start

Set the update publishers on the DAS

Download and install the toolkit on the DAS server, see: "Download the pkg-toolkit" and "Install the pkg-toolkit" above.

Remove the following publishers from the list of publishers for the image:
cd /opt/glassfish3
/opt/toolkit/pkg/bin/pkg -R /opt/glassfish3 set-publisher --disable contrib.glassfish.oracle.com
/opt/toolkit/pkg/bin/pkg -R /opt/glassfish3 set-publisher --disable contrib.glassfish.org

Connect Glassfish to Glassfish Update Toolkit:
/opt/toolkit/pkg/bin/pkg -R /opt/glassfish3 set-publisher -Pe -O http://${update_server_fqdn}:30000 release.glassfish.oracle.com

Verify that the local GlassFish Server repository is configured correctly:
/opt/toolkit/pkg/bin/pkg publisher

Update the DAS

cd /opt/glassfish3
./bin/asadmin stop-domain

./bin/pkg image-update
./bin/pkg image-update
./bin/asadmin start-domain --upgrade ${domain_name}

asadmin version

Ron Lievens,
Jan 27, 2013, 2:54 AM