Sun Java logo     Previous      Contents      Next     

Sun logo
Sun Java System Message Queue 3.5 SP1 Installation Guide 

Chapter 3
Linux Installation

This chapter explains the following topics as they apply to a Linux installation:


Hardware and Software Requirements

At a minimum, your Linux system should satisfy the minimum requirements indicated in the following table.

Table 3-1  Hardware and Software Requirements for Linux 

Component

Requirements

Operating system

Red Hat Advanced Server 2.1 Update 2, 3.0

CPU

Intel Pentium 2 (or compatible)

RAM

256 Mbytes

Disk space

The zip file containing the product is approximately 9 Mbytes.

The installed product requires approximately 8 Mbytes of hard drive space. Message Queue, however, may need more space if the broker stores persistent messages locally.

Java 2 Standard Edition (J2SE)

See Table 1-1 for the supported versions of the Java Runtime Environment (JRE) and Java Software Development Kit (JDK) that are supported on Linux.

The Message Queue software distribution CD includes the required JRE version at the time of release.

When installing the Enterprise Edition RPM on Linux you may see the following error if Network Security Services (NSS) is not installed:

# rpm -i imq-ent-3_5-02.i386.rpm
error: Failed dependencies:
    libsoftokn3.so is needed by imq-ent-3_5-02
  Suggested resolutions:
    mozilla-nss-1.4-3.0.18.i386.rpm

In fact, there is no hard dependency on mozilla-nss-1.4-3.0.18.i386.rpm as specified in this error message.

To work around this issue do the following:

  1. Make sure the Platform Edition is installed.
  2. Install the Enterprise Edition RPM using the --nodeps option so that the RPM does not verify package dependencies. For example:
  3. #rpm -i -nodeps imq-ent-3_5-02.i386.rpm


Installing Message Queue on Linux

The Sun Java System Message Queue product can be downloaded from the Sun Java System website or installed from the product CD-ROM. See the appropriate section below for instructions.


Note

If you are migrating from any prior Message Queue versions, you are required to first uninstall that version as described in the following section.


Finding and Removing Earlier Message Queue Versions

Because Message Queue is installed with other products (Sun Java System Application Server, and possibly others), you should check whether Message Queue has already been installed on your system, and uninstall it before installing Message Queue 3.5 SP1.

If a 3.0.x version of Message Queue is already on your system, you need to decide if you want to preserve any security-related data (flat-file user repository, access control file, or passfile). If, so, you will need to use the mqmigrate utility, as explained in subsequent paragraphs, before uninstalling the earlier version of Message Queue. If you do not want to preserve your old data files, you do not have to run the mqmigrate utility.

Note that RPM’s are now relocatable for all files in the /opt directory. You can use --prefix=dir with the -i option if you want to change the default /opt location. (Dir is the name of the directory where you want the files relocated.)

Depending on the version, Message Queue might have been installed using tar files or the Red Hat Package Manager (RPM). To check for installed versions, therefore, you need to check for both. It is recommended that you check first for RPM installations and then for tar file installations.

Migrating Files from Non-Standard Locations

The mqmigrate utility has a new option that allows you to migrate data that has been installed in a non-standard location (only applies to Message Queue 3.0.x data). The syntax for the new option is as follows:

-basedir <baseDirectory>

Where baseDirectory specifies the non-standard directory where the files were installed. For example, if the old data was untar’ed in the /export directory, you should migrate the old data using the command

./mqmigrate -basedir /export

Finding and Removing Message Queue RPM’s (Version 3.0.1 SP1 or Later Only)

    To Find and Remove Earlier RPM-Installed Versions of Message Queue
  1. Enter the following command:
  2. rpm -qa | grep imq

    If found, the version numbers of any RPM’s are imbedded in the RPM name. If none are found, proceed to Finding and Removing a Message Queue Tar-Based Installation.

  3. If you find Message Queue RPM’s of a version earlier than 3.5 SP1, remove them as follows:
    1. For 3.0.x versions only: If you wish to preserve existing broker instance data, run the mqmigrate utility (in the Message Queue 3.5 SP1 distribution) after completing Step 5):
    2. ./mqmigrate

      The mqmigrate utility moves existing broker instance data (broker configuration files and persistent data) and security-related files, to new Message Queue 3.5 SP1 locations.

    3. Remove the existing Message Queue installed software. Issue the following command(s) in the following order:
    4. rpm -e imq-ent

      (for Enterprise Editions only)

      rpm -e imq

      (for both editions)

      To remove the Enterprise edition, run both commands.

Finding and Removing a Message Queue Tar-Based Installation

    To Find and Remove Earlier Tar-Based Installed Message Queue
  1. See if the default Message Queue installation directory (/opt/imq/bin) exists on your system.
  2. If found, proceed to Step 2.

    If not found, Message Queue might have been installed in a non-default location. If you cannot remember the installation directory, search for the Message Queue imqbrokerd executable and note its root install directory. Proceed to Step 2.

    If there is no previous Message Queue installation, proceed to install Message Queue by following the directions in Installing from the Web or Installing from CD-ROM.

  3. If you find an earlier Message Queue installation in the default location (/opt/imq/bin), remove it as follows:
    1. If you wish to preserve existing broker instance data, run the mqmigrate utility (in the Message Queue 3.5 SP1 distribution) after completing Step 5):
    2. ./mqmigrate

      The mqmigrate utility moves existing broker instance data (broker configuration files and persistent data) and security-related files, to new Message Queue 3.5 SP1 locations.

    3. Remove the /opt/imq/ directory and all its contents.
    4. rm -rf /opt/imq

Installed Directory Structure

The install image below reflects a full (all RPM’s) Linux installation. This image might vary if you perform a partial installation.


Note

File locations for Message Queue bundled with Sun Java System Application Server, may differ from locations specified in Table 3-2.


Table 3-2  Installed Directory Structure: Linux 

Linux

Contents

COPYRIGHT
(not installed)

Copyright text file

LICENSE
(not installed)

License text file

LICENSEREADME/THIRDPARTY-
LICENSEREADME

(not installed)

License for third party software distributed by Message Queue: DOM4J, Apache Commons Logging

README
(not installed)

README text file

/opt/imq/bin/

Contains the executables for the broker (imqbrokerd) and the following Message Queue administration tools:

  • Administration Console (imqadmin)
  • Command (imqcmd)
  • Object Manager (imqobjmgr)
  • User Manager (imqusermgr)
  • Database Manager (imqdbmgr)
  • Key Tool (imqkeytool)

/opt/imq/lib/

Contains files that support the Message Queue Java client runtime:

/*.jar  jar files used to build and run Java JMS client applications

/*.war  war files used for HTTP servlet deployment

/*.rar  rar files used for Message Queue resource adapter

/opt/imq/lib/

Contains files used to support Message Queue tools and processes:

/ext  location for placing files needed for plug-in persistence capability

/props  subdirectory contains the broker’s default configuration files

/help  subdirectory contains Message Queue help files

/images

/etc/opt/imq/

Contains license files, instance template files, and rc script configuration files that can be used for automatic startup

/var/opt/imq/

Working storage directory for Message Queue.

/instances  subdirectory which will contain configuration files, log files, access control files, flat-file user repository, and file-based persistent data stores for each broker instance

/opt/imq/
javadoc/

Contains the Message Queue and JMS API documentation distributed as Javadoc (HTML)

/opt/imq/demo/

Source code for and instructions on how to run Java client example applications:

/opt/imq/
include/

Header files needed to support Message Queue C clients (Enterprise Edition only)

/opt/imq/lib/

Libraries needed to support Message Queue C clients (Enterprise Edition only)2

/opt/imq/demo/C/

Examples for writing C clients (Enterprise Edition only)

 

The JRE 1.4 files (on Windows only)

Installing from the Web

The following instructions explain how to download and install the Message Queue product on Linux from the Sun Java System website.

    To Install Message Queue on Linux from the Web
  1. Accept the license agreement on the Message Queue product download site.
  2. Download the Message Queue product distribution file from the website into an empty, temporary download directory, temp_directory.
  3. The download file is: imq3_5-edition-linx86.zip

    where edition takes one of the following values: plt or ent, depending on whether you are installing the Platform Edition or Enterprise Edition, respectively.

  4. Change to the temp_directory and uncompress the distribution file.
  5. unzip imq3_5-edition-linx86.zip

    The unzip command creates a imq3_5-edition directory which contains the distribution files: LICENSE, README, THIRDPARTYLICENSEREADME, and COPYRIGHT files; mqmigrate utility; and an rpms directory that contains the following RPM’s:

    imq-3_5-releaseVersion.i386.rpm
    (included in both Platform and Enterprise Editions)

    imq-ent-3_5-releaseVersion.i386.rpm
    (included in Enterprise Edition only)

  6. Change to the directory containing the Message Queue distribution files.
  7. cd mq3_5-edition

  8. Log in as root or change to superuser.
  9. For example, type the following at a command prompt:

    su root

    When prompted, type your root password.

  10. Install the appropriate RPM’s. Note that the Enterprise Edition requires Platform Edition to be installed.
  11. rpm -ivh rpms/imq-3_5-releaseVersion.i386.rpm
    (Platform Edition)

    rpm -ivh rpms/imq-ent-3_5-releaseVersion.i386.rpm
    (Enterprise Edition )

    The /opt/imq directory and its contents are created, and files are placed in other locations as well (see Migration Issues).

  12. Back up the imq3_5-edition-linx86.zip file from your temporary working directory.
  13. This is your logical media. Treat this file as you would any other installation media. Place a copy in a safe location in case you encounter a situation (such as a system failure) that requires reinstallation of the product.

  14. Clean up all remaining files in your temporary working directory.

  15. Note

    The instance data for any pre-existing broker instance is owned by whoever created that instance. Therefore, once installation is complete, be sure to run any Message Queue broker instance (using the -name instanceName option) as the owner with privileges to the /var/imq/instances/instanceName directory. This applies to the default broker instance (named imqbroker), as well.

    same correction


Installing from CD-ROM

The following instructions explain how to install the Message Queue product on Linux from CD-ROM.

    To Install Message Queue on Linux from CD-ROM
  1. Insert the Sun Java System Message Queue CD into your CD-ROM drive and mount it.
  2. mount /mnt/cdrom

    This command may vary depending on the version of Linux being used. Check the mount man page on the system.

  3. Change to the directory on the CD containing the Message Queue distribution:
  4. cd /mnt/cdrom/linux

    The contents of this directory vary depending on the Message Queue product edition.

  5. Continue with Step 5 under Installing from the Web.


Configuring the Java Runtime for Message Queue

At startup time, a broker (the Message Queue message server) checks to make sure it has access to the required Java runtime version (JDK/JRE 1.4). There are a number of ways you can configure or set the JRE used by the broker. These are shown in the following list, in order of precedence:

  1. Pass in the JDK or JRE using either the imqbrokerd -javahome or -jrehome command line options, respectively (if both are passed in, the last one on the command line will take precedence).
  2. Set the JDK or JRE in the IMQ_JAVAHOME environment variable.
  3. Let the broker use the installed JDK/JRE. The broker will pick up the latest version JDK/JRE installed on the system (greater than 1.4 and less than 2.0).
  4. The JDK is located in /usr/java/j2sdk1.x.x, and

    the JRE is located in /usr/java/j2re1.x.x

To find out why a broker is picking up a specific JDK/JRE, you can start the broker with the following command:

imqbrokerd -verbose


Upgrading from Platform to Enterprise Edition

Message Queue comes in two editions, as explained in Product Editions.

To upgrade from the Platform Edition to the Enterprise Edition, you need to first purchase the Enterprise Edition, and then install, as described below, only the Enterprise Edition license contained in the distribution. Installation of the license does not overwrite the Message Queue 3.5 SP1 modules already installed and does not modify the configuration of your Message Queue messaging system.

    To Upgrade to Enterprise Edition on Linux
  1. Stop any running brokers. (You will be prompted for the admin user name and password.)
  2. imqcmd shutdown bkr [-b hostName:port]

  3. Follow the installation procedure in Installing from the Web, Step 1 through Step 5 or in Installing from CD-ROM, Step 1 through Step 3.
  4. Install the Message Queue Enterprise Edition RPM.
  5. rpm -ivh rpms/imq-ent-3_5-01.i386.rpm

    This installs the Enterprise Edition license and C-API support files into the appropriate Message Queue directories.

  6. Verify that the Enterprise Edition license is available by running
  7. imqbrokerd -license


Where To Go Next

Read the README and Message Queue Release Notes files.

For an overview of Sun Java System Message Queue concepts, a brief introduction to writing and compiling a client application, see the Message Queue Java Client Developer’s Guide or the Message Queue C Client Developer’s Guide.

For details on configuring brokers and managing a Message Queue messaging system, see the Message Queue Administration Guide.

For class and member information used when writing a client application, browse the API documentation in the /opt/imq/javadoc directory.

To uninstall the product, see the following section.


Uninstalling Message Queue on Linux

The following instructions explain how to uninstall Message Queue on Linux.

    To Remove Message Queue on Linux
  1. Stop any running client applications.
  2. Stop any running brokers. (You will be prompted for the admin user name and password.
  3. imqcmd shutdown bkr [-b hostName:port]

  4. Unless you want to retain dynamic data, the Message Queue flat file user repository, and the Message Queue access control file associated with each broker instance, remove this data using the following command.
  5. imqbrokerd -name instanceName -remove instance

  6. Become root:
  7. su root

  8. Remove the Message Queue product.
  9. Issue the following command(s) in the following order:

    rpm -e imq-ent

    (for Enterprise Editions only)

    rpm -e imq

    (for both editions)

    To remove the Enterprise edition, run both commands.



Previous      Contents      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.