Installation Procedure

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 screens and responding to them interactively.

The following sections describe each of these two modes of Installer
operation.

Installing in GUI Mode

The following procedure shows how to use the Message Queue Installer
in GUI mode to install the Message Queue 4.2 product
on your Windows system.

To Install Message Queue in GUI Mode

Download the Message Queue Installer.

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_1-installer-WINNT.zip

Decompress the Installer archive.

Right-click on the mq4_1-installer-WINNT.zip file
and choose Extract All from the context menu.

The Windows Extraction
Wizard opens.

Follow the steps in the Extraction Wizard.

This creates
a folder named

mq4_1-installer

containing the files needed for Message Queue 4.2 installation.

Open the Installer folder.

Double-click on the mq4_1-installer folder to open it in Windows Explorer.

Figure 4–4 Installer JDK Selection Screen

Specify the version of the Java SDK for Message Queue to
use.

Select a Java SDK.

You can do
this in either of two ways:

Choose an SDK already installed on your system.

The drop-down menu under the option “Choose a Java SDK from the list below” lists existing SDKs
found in standard locations on your system. You can use this option to specify
one of these SDKs for Message Queue to use.

Provide an explicit path to an existing SDK.

To use an SDK 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.

Note –

The third option in the JDK Selection screen, “Install
and use the default version of the Java SDK,”
is intended for use on other platforms; it is disabled and unavailable for
Windows installation.

Tip –

After installation is complete, you can check which version of
the Java runtime Message Queue is using with the command

Figure 4–5 Installer Multilingual Packages Screen

By
default, Message Queue is installed to operate in the English language only.
The Multilingual Packages screen allows you to install it for use in another
language.

If you will be using Message Queue in a language other than English,
select the checkbox labeled “Install Message Queue multilingual packages.”

If you will be using Message Queue only in English, leave this
checkbox deselected.

Caution –

If you choose not to install the multilingual packages and
later decide that you do need them after all, there is no convenient way to
install them incrementally: you will have to uninstall Message Queue and then
repeat the entire installation procedure with the multilingual packages selected.
Before proceeding to install without the multilingual packages, be sure you
will not be needing them in the future.

Figure 4–7 Installer Progress Screen

Figure 4–8 Sun Connection Registration Screen

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 4–9)
for creating a Sun Online account:

Figure 4–9 Create Sun Online Account Screen

Note –

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.2 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 4–10) appears, summarizing the steps that were performed during installation.

Figure 4–10 Installer Summary Screen

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.

Tip –

After installation is complete, you can check that the expected
version of Message Queue has been installed by navigating to the Message Queue /bin directory and executing the command

imqbrokerd -version

The output from this command identifies the versions of Message Queue and
the Java SDK that are installed on your system.

Installing in Silent Mode

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 -nanswerFile

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-aanswerFile

This performs a silent installation as defined by the answer file, without
visibly displaying the GUI screens.

Manually Configuring the Java Runtime Environment

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 command

imqbrokerd -version

The output from this command includes the version and pathname of the
configured JRE: for example,

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 Windows, this file is located by default at

C:\Program Files\Sun\MessageQueue\mq\etc\imqenv.conf

After a successful Message Queue installation, it should include something
like the following:

set IMQ_DEFAULT_JAVAHOME=C:\Program Files\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).

Configuring Message Queue for Automatic Startup

To start a Message Queue message broker automatically at Windows system
startup, you must define the broker as a Windows service. The broker will
then start at system startup time and run in the background until system shutdown.
Consequently, you will not need to use the Message Queue Broker utility (imqbrokerd) unless you want to start an additional broker.

To install a broker as a Windows service, use the Message Queue Service
Administrator utility:

imqsvcadmin install

You can use the imqsvcadmin command’s -args option to pass startup arguments to the broker. For more information,
see the sections “Automatic Startup on Windows” in Chapter 3, “Starting
Brokers and Clients,” and “Service Administrator Utility”
in Chapter 13, “Command Line Reference,” of the Message Queue Administration Guide.