Using the GlassFish ESB Installation CLI

Using the GlassFish ESB Installation CLI

This topic provides instructions that lead you through the procedures to successfully install GlassFish ESB using a command-line interface (CLI). This interface allows you to interact with software or an operating system using a terminal, remote shell, or command prompt.

Prior to attempting an installation, read Planning for GlassFish ESB Installation. It provides pertinent information such as supported platforms, operating system limitations, and parameter definitions. If you have any questions or problems, go to the GlassFish ESB web site at http://www.glassfish-esb.org.

To access all the GlassFish ESB documentation in HTML format, go to the GlassFish ESB web site at http://wiki.open-esb.java.net/Wiki.jsp?page=GlassFishESBDocs.

What You Need to Know

This topic contains conceptual information about the installation.

What You Need to Do

These topics contain the procedures for installing a Java Development Kit (JDK) and GlassFish ESB.

Overview of CLI Installations

Before beginning the installation, read Planning for GlassFish ESB Installation, which contains information that is necessary for you to complete a successful install of GlassFish ESB such as supported platforms, operating system limitations, and parameter definitions. You can use a command–line installation script on any of the supported operating systems by first generating the .xml state file and then invoking the installation script. The command–line installation performs a complete installation of GlassFish ESB.

Complete Command Line Interface Installation

The following software is installed:

The process also installs the Sun Uninstallation software.


Caution – Caution –

GlassFish ESB does not support spaces in the installation directory path.



Note –

You must have the JDKTM (Java Development Kit) software installed and JAVA_HOME set prior to installing GlassFish ESB or the Installer will halt the installation. See Installing the JDK Software and Setting JAVA_HOME for details.


Installing the JDK Software and Setting JAVA_HOME

If you do not already have the JDK software installed or if JAVA_HOME is not set, the GlassFish ESB installation will not be successful. The following tasks provide the information you need to install the JDK software and set JAVA_HOME on UNIX or Windows systems.

The following list provides the GlassFish ESB JDK requirements by platform.

Solaris

JDK5: At least release 1.5.0_14

JDK6: At least release 1.6.0_03

Linux (Red Hat and SUSE)

JDK5: At least release 1.5.0_14

JDK6: At least release 1.6.0_03

Macintosh

JDK5: The latest 1.5 release supported by Apple

Microsoft Windows

JDK5: At least release 1.5.0_14

JDK6: At least release 1.6.0_03


Caution – Caution –

The GlassFish ESB Installer does not support JDK release 1.6.0_04 in the 64–bit version on the Solaris SPARC or AMD 64–bit environments.


ProcedureTo Install the JDK Software and Set JAVA_HOME on a UNIX System

  1. Install the JDK software.

    1. Go to http://java.sun.com/javase/downloads/index.jsp.

    2. Select the appropriate JDK version and click Download.

      The JDK software is installed on your computer, for example, at /usr/jdk/jdk1.6.0_02. You can change this location.

  2. Set JAVA_HOME.

    • Korn and bash shells:

      export JAVA_HOME=jdk-install-dir
      
      export PATH=$JAVA_HOME/bin:$PATH
      
    • Bourne shell:

      JAVA_HOME=jdk-install-dir
      
      export JAVA_HOME
      
      PATH=$JAVA_HOME/bin:$PATH
      
      export PATH
      
    • C shell:

      setenv JAVA_HOME jdk-install-dir
      
      setenv PATH $JAVA_HOME/bin:$PATH
      
      export PATH=$JAVA_HOME/bin:$PATH
      
  3. Change the permissions to enable you to run the GlassFish ESB Installer.

    chmod 755 JavaCAPS.bin
    

ProcedureTo Install the JDK Software and Set JAVA_HOME on a Windows System

  1. Install the JDK software.

    1. Go to http://java.sun.com/javase/downloads/index.jsp.

    2. Select the appropriate JDK software and click Download.

      The JDK software is installed on your computer, for example, at C:\Program Files\Java\jdk1.6.0_02. You can move the JDK software to another location if desired.

  2. Set JAVA_HOME:

    1. Right click My Computer and select Properties.

    2. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.

Generating the State File for Silent Installations

In order to run a silent command line installation, you must first do a full GUI installation. The GUI installer generates a state file that provides all of the user-entered parameters that the installer requires. This section provides a procedure for generating the state file for silent installation. After you generate the silent installation state file, note its location so that you can reference it when you launch the silent installation.

After creating a configuration properties file, you are ready to perform a silent CLI installation. For more information, see Installing GlassFish ESB Silently Using CLI.

ProcedureTo Generate the State File for Silent Installations

  1. From the command line, run the GlassFish ESB GUI installer with the --record option, specifying where you want to save the state file. For example:

    glassfishesb-full-installer.sh --record /home/jdoe/glassfishesb-state.xml

    Note –

    For detailed information about running the GUI installer, see Using the GlassFish ESB Installation GUI.


  2. When the GUI installer is finished, run the GlassFish ESB uninstaller and remove the GUI installation.


    Note –

    For detailed information about running the GlassFish ESB uninstaller, see Uninstalling GlassFish ESB.


  3. Using a text editor or XML editor, open the state file and verify that the installation properties correspond to those that you entered during the GUI installation. Here is an example of the .xml state file:

  4. Ensure that items such as usernames, passwords, filepaths, and so on are correct, save any changes, and close the state file.


Example 1 Excerpt from the .xml State File Generated by the GlassFish ESB GUI Installer

<?xml version="1.0" encoding="UTF-8"?>
<state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:noNamespaceSchemaLocation="state-file.xsd">
<properties>
        <property name="street.address.windows-x86.en_US"/>
        <property name="country.windows-x86.en_US">United States</property>
        <property name="company.windows-x86.en_US"/>
        <property name="password.windows-x86.en_US"/>
        <property name="email.address.windows-x86.en_US"/>
        <property name="first.name.windows-x86.en_US"/>
        <property name="last.name.windows-x86.en_US"/>
        <property name="register.choice.windows-x86.en_US">skip</property>
        <property name="zip.code.windows-x86.en_US"/>
        <property name="city.windows-x86.en_US"/>
    </properties>
    <components>
        <product platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86" 
                 status="to-be-installed" uid="nb-base" version="6.1.0.0.200809090101">
            <properties>
                <property name="start.menu.shortcut.location.windows-x86.en_US">all.users</property>
                <property name="desktop.shortcut.location.windows-x86.en_US">all.users</property>
                <property name="jdk.location.windows-x86.en_US">C:\Program Files\Java\jdk1.6.0_07</property>
                <property name="installation.location">$N{install}/netbeans</property>
                <property name="installation.location.windows">$N{install}/netbeans</property>
                <property name="installation.location.macosx">$N{install}/netbeans.app</property>
                <property name="installation.location.windows-x86.en_US">C:\GlassFishESB\netbeans</property>
            </properties>
        </product>
        <product platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86" 
                 status="to-be-installed" uid="nb-soa" version="6.1.0.0.80909">
            <properties>
                <property name="installation.location.windows-x86.en_US">C:\GlassFishESB\netbeans</property>
            </properties>
        </product>
        <product platform="windows" status="to-be-installed" uid="glassfish" version="9.1.0.4.20080411">
            <properties>
                <property name="admin.port.windows-x86.en_US">4848</property>
                <property name="jdk.location.windows-x86.en_US">C:\Program Files\Java\jdk1.6.0_07</property>
                <property name="http.port.windows-x86.en_US">8080</property>
                <property name="https.port.windows-x86.en_US">8181</property>
                <property name="password.windows-x86.en_US">adminadmin</property>
                <property name="installation.location">$N{install}/glassfish</property>
                <property name="username.windows-x86.en_US">admin</property>
                <property name="installation.location.windows-x86.en_US">C:\GlassFishESB\glassfish</property>
            </properties>
        </product>
        <product platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86" 
                 status="to-be-installed" uid="openesb" version="2.0.0.80909.0">
            <properties>
                <property name="password.windows-x86.en_US">adminadmin</property>
                <property name="username.windows-x86.en_US">admin</property>
                <property name="installation.location.windows-x86.en_US">
                          C:\GlassFishESB\glassfish\addons\jbi-components</property>
            </properties>
        </product>
        <product platform="windows linux solaris-sparc solaris-x86 macosx-ppc macosx-x86" 
                 status="to-be-installed" uid="jbicomponents" version="2.0.0.80909.1">
            <properties>
                <property name="password.windows-x86.en_US">adminadmin</property>
                <property name="username.windows-x86.en_US">admin</property>
                <property name="installation.location.windows-x86.en_US">
                          C:\GlassFishESB\glassfish\addons\jbi-components</property>
            </properties>
        </product>
    </components>
</state>

Installing GlassFish ESB Silently Using CLI

You can use the GlassFish ESB command-line installation script to perform a complete installation silently. A silent installation means that you will not interact with the Installer, nor will you see the process unless you open the directory to which you are installing.

In order to perform a silent installation, you must first generate the .xml state file. For more information, see Generating the State File for Silent Installations.


Note –

GlassFish ESB does not support spaces in the installation directory path.


ProcedureTo Install GlassFish ESB Silently Using CLI

Before You Begin
  1. Download the installation executable file from the GlassFish ESB Downloads page: https://open-esb.dev.java.net/Downloads.html

  2. If you have not done so already, copy the .xml state file to the directory where you are going to install GlassFish ESB.

    For more information, see Generating the State File for Silent Installations.

  3. Extract the installation executable file to the directory where you are going to install GlassFish ESB.

    • Windows: glassfishesb-full-installer-windows-yyyydddd.exe

    • Solaris Sparc glassfishesb-full-installer-solaris-sparc-yyyydddd.sh

    • Solaris —X86 glassfishesb-full-installer-solaris-x86-yyyydddd.sh

    • Linux glassfishesb-full-installer-linux-yyyydddd.sh

    • Mac OSX X86 glassfishesb-full-installer-macosx-x86-yyyydddd.command

    • Mac OSX PPC glassfishesb-full-installer-macosx-ppc-yyyydddd.command

  4. Go to the installation directory where you copied the configuration properties file and the installation executable file and execute the file.

    • Windows: glassfish-full-installer-windows-yyyddd.exe --silent --state \filepath\state_file_name.xml

    • Solaris and Linux: glassfish-full-installer-platform-yyyddd.sh --silent --state /filepath/state_file_name.xml

    • Mac OSX: glassfish-full-installer-macosx-cpu_type-yyyddd.command --silent --state /filepath/state_file_name.xml

    GlassFish ESB is installed in the directory you specified.

Starting NetBeans

To start NetBeans, after the initial installation, navigate to the GlassFish ESB install directory or to the directory where the component is installed that you want to start. Run the appropriate command.

Component 

From GlassFish ESB Installation Directory 

NetBeans IDE 

Windows GUI: Double-click the NetBeans desktop icon or select NetBeans from the Start menu

Mac OSX GUI: Select the NetBeans icon in the Dock or double-click NetBeans.app in the Applications directory

Windows CLI directory: install-directory\netbeans.exe

Solaris and Linux directory: install-directory/netbeans/bin