You can run the Message Queue Installer in any of three modes:
In GUI (graphical user interface) mode, the Installer presents a series of graphical screens with which you interact using mouse clicks and keyboard text entry.
In silent mode, the Installer operates from a predefined answer file representing your responses to the GUI screens. This allows you to script the installation process in advance and then perform it in batch mode without actually displaying the GUI (or text) screens and responding to them interactively.
Text mode installation is not supported in Message Queue 4.4 Update 1.
The following sections describe each of the two modes of Installer operation.
The following procedure shows how to use the Message Queue Installer in GUI mode to install the Message Queue 4.4 Update 1 product on your Linux system.
Create a temporary directory.
From your system’s command line, enter the command
% mkdir tempDir
where tempDir is any name you choose for your temporary directory.
Download the Message Queue Installer to the temporary directory.
The Installer is available for download from the Message Queue product Web site at
http://www.sun.com/software/products/message_queue
It is distributed as a compressed archive (.zip) file named
mq4_4-installer-Linux_X86.zip
Go to the temporary directory.
Enter the following command:
% cd tempDir
where tempDir is the temporary directory to which you downloaded the Installer in step 3.
Decompress the Installer archive.
Enter the following command:
% unzip mq4_4-installer-Linux_X86.zip
This creates a subdirectory named
mq4_4-installer
containing the files needed for Message Queue 4.4 Update 1 installation.
Switch to the Installer subdirectory.
Enter the following command:
% cd mq4_4-installer
Set the JAVA_HOME environment variable to point to a valid version of JRE. Alternatively, you can use the -j installer option to point to a valid JRE version.
Start the Installer.
Enter the following command:
% ./installer
If you have not already set JAVA_HOME to point to a valid version of JRE, run the installer with the -j option as follows:
% ./installer -j path_to_JRE_installation
The Installer’s Welcome screen (Figure 3–1) appears.
Click the Next button.
The Installer’s License screen (Figure 3–2) appears.
Read and accept the product license agreement.
Installation and use of the Message Queue product are subject to your acceptance of the license agreement. You must read and accept the terms of the license agreement before installing the product.
Read the product license agreement.
Make sure the radio button labeled “I accept the terms in the license agreement” is selected.
If you instead select “I do not accept the terms in the license agreement,” the Next button becomes disabled. You cannot proceed with installation without accepting the license terms.
Click the Next button.
The Install Home screen appears.
Specify the installation directory.
Enter the path to the installation home directory in the text field, or use the button marked with an ellipsis (…) to browse to it interactively.
If you enter a path to a directory that does not exist on your system, the Installer will create the directory for you automatically.
Click Next.
The Installer’s JDK Selection screen (Figure 2–3) appears.
Specify the version of the JDK for Message Queue to use.
Select a JDK.
You can do this in any of these ways:
Choose a JDK installation that is already installed on your system.
The drop-down menu under the option “Choose a JavaTM SDK from the list below” lists existing JDKs found in standard locations on your system. You can use this option to specify one of these JDKs for Message Queue to use.
Provide an explicit path to an existing JDK.
To use a JDK from a location other than the standard ones, enter its path in the text field under the option “Type in a Java SDK location below,” or use the button marked with an ellipsis (…) to browse to it interactively.
Click the Next button.
The Installer’s Ready screen (Figure 2–4) appears.
Click Install to begin the installation.
The Installer’s Progress screen (Figure 3–5) appears, tracking the progress of the installation as it proceeds.
When installation is complete, the Installer's Sun Connection Registration screen (Figure 3–6) appears.
Register Message Queue with Sun Connection.
Sun Connection is a Sun-hosted service that helps you track, organize, and maintain Sun hardware and software. When you register a Message Queue installation with Sun Connection, information such as the release version, host name, operating system, installation date, and other such basic information is securely transmitted to the Sun Connection database. The Sun Connection inventory service can help you organize your Sun hardware and software, while the update service can inform you of the latest available security fixes, recommended updates, and feature enhancements.
Registration requires that you have a Sun Online account or create one. If you do not already have an account, the installer provides the following screen (Figure 3–7) for creating a Sun Online account:
If you choose not to register Message Queue during installation, you can subsequently register Message Queue by running the installer in register-only mode, as follows:
% ./installer -r
The register-only mode requires that Message Queue 4.4 Update 1 already be installed and will display only the installer screens related to registration.
When Sun Connection registration is complete, the Installer’s Summary screen (Figure 3–8) appears, summarizing the steps that were performed during installation.
You can click the links on this screen for a detailed summary report and a log file giving more details on the installation.
Click the Exit button to dismiss the Summary screen.
Message Queue installation is now complete.
After installation is complete, you can check that the expected versions of Message Queue and the Java runtime have been installed by navigating to the mqInstallHome/mq/bin directory and executing the following command:
% imqbrokerd -version
The output from this command identifies the versions of Message Queue and the JDK that are installed on your system.
In silent mode, the Installer operates from a predefined answer file representing your responses to the GUI screens. This allows you to script the installation process in advance and then perform it in batch mode without actually displaying the GUI screens and responding to them interactively.
To create an answer file, start the Installer with the -n option:
% ./installer -n answerFile
where answerFile identifies the file in which to record your responses. This causes the Installer to execute a “dry run,” presenting the sequence of GUI screens without actually performing the installation. Your input responses are recorded in the specified answer file. You can then perform the installation at a later time by starting the Installer with the -s (“silent”) option, specifying the same answer file:
% ./installer -s -a answerFile
This performs a silent installation as defined by the answer file, without visibly displaying the GUI (or text) screens.
The Message Queue Installer’s JDK Selection screen is not the only way to specify a version of the Java Runtime Environment for Message Queue to use. The JRE used by the Message Queue command line utilities (imqadmin, imqbrokerd, imqcmd, imqobjmgr, imqdbmgr, imqusermgr, imqkeytool) is determined by the following sources, in order of precedence:
The -jrehome or -javahome command line option to the imqbrokerd command. (If both are specified, the one occurring last on the command line takes precedence).
The J2SE file location specified in the jdk.env file. (This file is deprecated, but is still supported for backward compatibility. For historical reasons, it has higher priority than anything else except option 1.)
The IMQ_JAVAHOME environment variable.
The environment variable IMQ_DEFAULT_JAVAHOME in the imqenv.conf file.
The system default locations, as specified in the documentation for your platform.
To check which version of the Java runtime Message Queue will use, enter the following command:
% imqbrokerd -version
The output from this command includes the version and pathname of the configured JRE: for example,
Java Runtime: 1.5.0_12 Sun Microsystems Inc. /usr/java/jdk1.5.0_12/jre
When you specify a JRE location through the Installer’s JDK Selection screen, the Installer saves that location as the value of IMQ_DEFAULT_JAVAHOME in the imqenv.conf file (option 4 in the list above). On Linux, this file is located at
mqInstallHome/etc/mq/imqenv.conf
After a successful Message Queue installation, it should include something like the following:
IMQ_DEFAULT_JAVAHOME=/usr/java/jdk1.5.0_12
You can override this setting, however, either by editing the imqenv.conf file or by setting one of the other options higher in the list. This can be useful, for instance, for testing or reconfiguring the broker when a newer JRE version becomes available. Understanding how the JRE is determined can also help in troubleshooting problems. For instance, if the imqbrokerd -version command shows that Message Queue is using an unexpected JRE, it may be that one of the higher-precedence options has been set inadvertently (such as by an old jdk.env file that should have been deleted).
To configure the Message Queue message broker to start up automatically at boot time, become the root user and edit the configuration file mqInstallHome/etc/mq/imqbrokerd.conf. Table 3–2 shows the startup properties you can set in this file.
Table 3–2 Configuration Properties for Automatic Startup
Property Name |
Values |
Default Value |
Description |
---|---|---|---|
AUTOSTART |
YESNO |
NO |
Start broker automatically at boot time? |
ARGS |
String |
None |
Command line options and arguments for broker startup command See the section “Broker Utility” inChapter 16, Command Line Reference, in Sun GlassFish Message Queue 4.4 Administration Guide for Broker Utility command line options. |
RESTART |
YESNO |
YES |
Restart broker automatically on abnormal exit? |