Sun Java System Message Queue 4.2 Installation Guide

Chapter 3 Linux Installation

This chapter covers the following topics as they apply to a Linux installation of Message Queue 4.2:

Hardware Requirements

In order to install Message Queue 4.2, your Linux system should satisfy the minimum hardware requirements shown in Table 3–1. See Supported Platforms and Components for information on software requirements.

Table 3–1 Minimum Hardware Requirements for Linux Installation

Component 

Minimum Requirements 

CPU

Intel Pentium 2 (or compatible) 

RAM

256 MB

(2 GB recommended for high-availability or high-volume deployments)

Disk space 

Compressed installation (.zip) file: approximately 150 MB

Temporary working directory (for extracting installation files): approximately 216 MB

Installed product: approximately 22 MB (Message Queue only, not including shared components). More space may be needed if broker stores persistent messages locally.

Upgrading from Previous Versions

Because Message Queue is installed with other products (such as Sun JavaTM System Application Server), you should check whether it has already been installed on your system. To do so, enter the command

   imqbrokerd  -version

If Message Queue is already installed, its version number will be displayed. The Message Queue 4.2 Installer will upgrade automatically to Version 4.2 from any Version 3.6 or later. If you have a version earlier than 3.6 installed, you will need to uninstall it before running the Message Queue 4.2 Installer.


Caution – Caution –

The Message Queue 4.2 Installer does not share the same product registry with other installers, such as those of the Sun Java Enterprise System (JES) and Sun Java System Application Server, which include Message Queue as a component. The Message Queue Installer also installs or upgrades shared software components that Message Queue depends on, such as the Java Software Development Kit (SDK), Netscape Portable Runtime (NSPR), Network Security Services (NSS), and JavaHelp. Using this Installer to upgrade an earlier version of Message Queue that was installed with another installer may upgrade such shared components without correctly updating their version numbers in the other installer’s product registry, leaving that registry in an inconsistent state.

If you later run the other installer, the inconsistent registry entries may in turn cause that installer to inadvertently remove Message Queue 4.2. The safest and cleanest way to upgrade an earlier version of Message Queue that was installed with a different installer is as follows:

  1. Use the other installer’s uninstaller to remove Message Queue.

  2. Use the Message Queue 4.2 Installer to install Message Queue 4.2.


Installation Procedure

You can run the Message Queue Installer in any of three modes:

The following sections describe each of these three 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 Linux system.

ProcedureTo Install Message Queue in GUI Mode

  1. Become the root user.

    You must have root user privileges to run the Message Queue Installer. Enter the command

       su
    

    and provide a valid root user password when prompted to do so.

  2. 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.

  3. 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_1-installer-Linux_X86.zip
    
  4. Go to the temporary directory.

    Enter the command

       cd tempDir
    

    where tempDir is the temporary directory to which you downloaded the Installer in step 3.

  5. Decompress the Installer archive.

    Enter the command

       unzip mq4_1-installer-Linux_X86.zip
    

    This creates a subdirectory named

       mq4_1-installer
    

    containing the files needed for Message Queue 4.2 installation.

  6. Switch to the Installer subdirectory.

    Enter the command

       cd mq4_1-installer
    
  7. Start the Installer.

    Enter the command

       installer
    

    The Installer’s Welcome screen (Figure 3–1) appears.

    Figure 3–1 Installer Welcome Screen

    Screen capture showing Message Queue Installer’s
Welcome screen.

  8. Click the Next button.

    The Installer’s License screen (Figure 3–2) appears.

    Figure 3–2 Installer License Screen

    Screen capture showing Message Queue Installer’s
License screen.

  9. 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.

    1. Read the product license agreement.

    2. 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.

    3. Click the Next button.

      The Installer’s JDK Selection screen (Figure 3–3) appears.

      Figure 3–3 Installer JDK Selection Screen

      Screen capture showing Message Queue Installer’s
JDK Selection screen.

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

    1. Select a Java SDK.

      You can do this in any of three ways:

      • Install the default SDK.

        Select the option labeled “Install and use the default version of the Java SDK.”

      • 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.

    2. Click the Next button.

      The Installer’s Multilingual Packages screen (Figure 3–4) appears.

      Figure 3–4 Installer Multilingual Packages Screen

      Screen capture showing Message Queue Installer’s
Multilingual Packages screen.

  11. Specify whether to install multilingual packages.

    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.

    1. 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 – 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.


    2. Click the Next button.

      The Installer’s Upgrade screen (Figure 3–5) appears.

      Figure 3–5 Installer Upgrade Screen

      Screen capture showing Message Queue Installer’s
Upgrade screen.

  12. Specify whether to upgrade Message Queue and its shared components.

    If an earlier version of Message Queue exists on your system, or if any of the shared components on which Message Queue depends need to be upgraded from earlier versions, the Upgrade screen displays them in a scrollable list along with their current and required versions. If no upgrades are needed, the existing components are simply listed with their version numbers and a notation that they will remain at their current versions. In this case, the “Upgrade” and “Do not upgrade” radio buttons do not appear; just click Next to proceed to the next step.


    Caution – Caution –

    It is possible that upgrading Message Queue’s shared components may break other software components on your system that depend on the earlier versions previously installed. Be sure there are no such dependencies before proceeding with the upgrade.


    To proceed with the upgrade:

    1. Make sure the radio button labeled “Upgrade” is selected.

      If you instead select “Do not upgrade,” the Next button becomes disabled; your only options at this point are Back (to return to the previous screen) or Cancel (to exit the Installer without completing installation).

    2. Click the Next button.

      The Installer’s Ready screen (Figure 3–6) appears.

      Figure 3–6 Installer Ready Screen

      Screen capture showing Message Queue Installer’s
Ready screen.

  13. Click Install to begin the installation.

    The Installer’s Progress screen (Figure 3–7) appears, tracking the progress of the installation as it proceeds.

    Figure 3–7 Installer Progress Screen

    Screen capture showing Message Queue Installer’s
Progress screen.

    When installation is complete, the Installer's Sun Connection Registration screen (Figure 3–8) appears.

    Figure 3–8 Sun Connection Registration Screen

    Screen for Sun Connection registration.

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

    Figure 3–9 Create Sun Online Account Screen

    Screen for creating a Sun Online account.


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

    Figure 3–10 Installer Summary Screen

    Screen capture showing Message Queue Installer’s
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.

  15. 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 versions of Message Queue and the Java runtime have 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 Text Mode

For situations in which you do not have access to a windowing system to display the Installer’s full graphical user interface, the Message Queue Installer provides an alternate text mode that simulates the operation of the GUI using plain text displayed directly in your terminal window. For example, Figure 3–11 shows the text-mode counterpart of the Welcome screen shown earlier in Figure 3–1. Instead of clicking the Next button with the mouse, you would use the Tab key to advance the cursor to that button, then select it by pressing Return.

Figure 3–11 Installer Welcome Screen in Text Mode

Screen capture showing Message Queue Installer’s
Welcome screen displayed as plain text in the terminal window.

To start the Installer in text mode, use the -t option when invoking it from the command line:

   installer  -t

The rest of the installation process is essentially the same as described above under Installing in GUI Mode, except that instead of the mouse, you must use keyboard keys such as Tab, Return, and arrow keys to select the various elements of the Installer screens.

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

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:

  1. 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).

  2. 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.)

  3. The IMQ_JAVAHOME environment variable.

  4. The environment variable IMQ_DEFAULT_JAVAHOME in the imqenv.conf file.

  5. 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,

   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

   /etc/opt/sun/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).

Configuring Message Queue for Automatic Startup

To configure the Message Queue message broker to start up automatically at boot time, become the root user and edit the configuration file /etc/opt/sun/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

YES
NO

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 15, Command Line Reference, in Sun Java System Message Queue 4.2 Administration Guide for Broker Utility command line options.

RESTART

YES
NO

YES

Restart broker automatically on abnormal exit? 

To check that startup changes are correct without booting the system, you can, as the root user, explicitly run the Message Queue initialization script in debug mode with the command

   env DEBUG=1 /etc/init.d/imq  start

Message Queue Packages (RPMs)

Table 3–3 lists the packages (RPMs) used by Message Queue on the Linux platform.

Table 3–3 Message Queue RPMs (Linux)

Name 

Description 

Message Queue Product

sun-mq

Message Queue /opt files (see Table 3–4)

sun-mq-var

Message Queue instance data 

sun-mq-config

Message Queue configuration files 

sun-mq-jmsclient

Message Queue Java client runtime 

sun-mq-xmlclient

Message Queue XML client runtime

sun-mq-jaxm

Message Queue Java API for XML Messaging (JAXM) client runtime

sun-mq-capi

Message Queue C client API

sun-mq-install

Message Queue Installer metadata 

Message Queue Multilingual Packages

sun-mq-fr

Message Queue for French language 

sun-mq-es

Message Queue for Spanish language 

sun-mq-de

Message Queue for German language 

sun-mq-zh_TW

Message Queue for Traditional Chinese 

sun-mq-zh_CN

Message Queue for Simplified Chinese 

sun-mq-ja

Message Queue for Japanese language 

sun-mq-ko

Message Queue for Korean language 

J2SETM Development Kit (JDK)

jdk-1_5_0_12-linux-i586

JDK 1.5.0_12 (32–bit)

jdk-1_5_0_12-linux-amd64

JDK 1.5.0_12 (64–bit)

NSPR/NSS

sun-nspr-4.6.7-2.i386

Netscape Portable Runtime (NSPR) libraries (32–bit)

sun-nspr-4.6.7-2.x86_64

Netscape Portable Runtime (NSPR) libraries (64–bit)

sun-nss-3.11.7-2.i386

Network Security Services (NSS) libraries (32–bit)

sun-nss-3.11.7-2.x86_64

Network Security Services (NSS) libraries (64–bit)

Sun Installation Framework

sun-install-engine-core

Sun installation software support files 

sun-install-resources

Sun installation software resources 

JavaHelp

sun-javahelp-2.0-fcs

JavaHelp runtime/development environment 

Installed Directory Structure

Table 3–4 shows the installed directory structure for a full (all RPMs) installation of Message Queue 4.2 on the Linux platform.


Note –

The directory structure may vary if you have installed Message Queue as part of a Sun Java System Application Server installation.


Table 3–4 Installed Directory Structure (Linux)

Directory 

Contents 

/opt/sun/mq/bin

Executable files for Message Queue administration tools:  

  • Administration Console (imqadmin)

  • Broker utility (imqbrokerd)

  • Command utility (imqcmd)

  • Object Manager utility (imqobjmgr)

  • Database Manager utility (imqdbmgr)

  • User Manager utility (imqusermgr)

  • Key Tool utility (imqkeytool)

/opt/sun/mq/share/lib

Support files for Message Queue Java client runtime:  

  • .jar files for building and running Java Message Service (JMS) client applications

  • .rar files for JMS Resource Adapter

  • .war files for HTTP servlet deployment

/opt/sun/mq/share/lib/ext

.jar or .zip files to be added to broker’s CLASSPATH environment variable

Typically used for configuring JDBC-based persistence or Java Authentication and Authorization Service (JAAS) login modules.

/opt/sun/mq/private/share/lib

Support files for Message Queue tools and processes 

/opt/sun/mq/private/share/lib/props

Broker’s default configuration files 

/opt/sun/mq/private/share/lib/images

Administration GUI image files

/opt/sun/mq/private/share/lib/help

Administration GUI help files

/opt/sun/mq/javadoc

Message Queue and JMS API documentation in JavaDoc format

/opt/sun/mq/examples

Example Java client applications 

/opt/sun/mq/include

Header files to support C client applications 

/var/opt/sun/mq

Message Queue working storage 

/var/opt/sun/mq/instances

Configuration properties, file-based persistent data stores, log files, flat-file user repositories, access control properties files for individual broker instances 

/var/opt/sun/install/contents/mq

Message Queue Uninstaller 

/var/opt/sun/install/logs/mq

Message Queue installation/uninstallation logs and summary file 

/etc/opt/sun/mq

Message Queue configuration files, instance template files, sample password file, rc script configuration files for automatic startup

Uninstallation Procedure

Like the Installer, the Message Queue Uninstaller can be run in any of three modes of operation:

The following sections describe each of these three modes of Uninstaller operation.


Caution – Caution –

The Message Queue installation includes several scripts and executables named uninstaller, both in the Installer .zip bundle and on your system after installation. To uninstall Message Queue 4.2, it is important that you run the correct uninstaller executable, located at

   /var/opt/sun/install/contents/mq/uninstaller

Be careful not to invoke some other uninstaller by mistake.


Uninstalling in GUI Mode

The following procedure shows how to use the Message Queue Uninstaller in GUI mode to uninstall Message Queue 4.2 from your Linux system.

ProcedureTo Uninstall Message Queue in GUI Mode

  1. Set your working directory to the directory containing the Uninstaller.

    From your system’s command line, enter the command

       cd /var/opt/sun/install/contents/mq
    
  2. Become the root user.

    You must have root user privileges to run the Message Queue Uninstaller. Enter the command

       su
    

    and provide a valid root user password when prompted to do so.

  3. Start the Uninstaller.

    Enter the command

       uninstaller
    

    The Uninstaller’s Ready screen (Figure 3–12) appears.

    Figure 3–12 Uninstaller Ready Screen

    Screen capture showing Message Queue Uninstaller’s
Ready screen.

  4. Click the Remove button.

    The Uninstaller’s Progress screen (Figure 3–13) appears.

    Figure 3–13 Uninstaller Progress Screen

    Screen capture showing Message Queue Uninstaller’s
Progress screen.

    When uninstallation is complete, the Uninstaller’s Summary screen (Figure 3–14) appears, summarizing the steps that were performed during uninstallation. You can click the links on this screen for a detailed summary report and a log file giving more details on the uninstallation.

    Figure 3–14 Uninstaller Summary Screen

    Screen capture showing Message Queue Uninstaller’s
Summary screen.

  5. Click the Exit button to dismiss the Summary screen.

    Message Queue uninstallation is now complete.

Uninstalling in Text Mode

For situations in which you do not have access to a windowing system to display the Uninstaller’s full graphical user interface, the Message Queue Uninstaller provides an alternate text mode that simulates the operation of the GUI using plain text displayed directly in your terminal window. For example, Figure 3–15 shows the text-mode counterpart of the Ready screen shown earlier in Figure 3–12. Instead of clicking the Next button with the mouse, you would use the Tab key to advance the cursor to that button, then select it by pressing Return.

Figure 3–15 Uninstaller Ready Screen in Text Mode

Screen capture showing Message Queue Uninstaller’s
Ready screen displayed as plain text in the terminal window.

To start the Uninstaller in text mode, use the -t option when invoking it from the command line:

   uninstaller  -t

The rest of the uninstallation process is essentially the same as described above under To Uninstall Message Queue in GUI Mode, except that instead of the mouse, you must use keyboard keys such as Tab, Return, and arrow keys to select the various elements of the Uninstaller screens.

Uninstalling in Silent Mode

In silent mode, the Uninstaller operates from a predefined answer file representing your responses to the GUI screens. This allows you to script the uninstallation 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 Uninstaller with the -n option:

   uninstaller  -n answerFile

where answerFile identifies the file in which to record your responses. This causes the Uninstaller to execute a “dry run,” presenting the sequence of GUI screens without actually performing the uninstallation. Your input responses are recorded in the specified answer file. You can then perform the uninstallation at a later time by starting the Uninstaller with the -s (“silent”) option, specifying the same answer file:

   uninstaller  -s  -a answerFile

This performs a silent uninstallation as defined by the answer file, without visibly displaying the GUI (or text) screens.