Sun ONE logo      Previous      Contents      Next     
Sun ONE Message Queue 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 development system should satisfy the minimum requirements indicated in the following table.

Table 3-1    Hardware and Software Requirements for Linux 



Operating system  

Red Hat Linux 7.1 (or compatible)  


Intel Pentium 166 MHz (or compatible) PC that is TCP/IP networked  


128 Mbytes  

Hard drive space  

The GNUZIP tar file containing the product is approximately 8 Mbytes.

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


1.4 JVM

The MQ software distribution CD includes the JRE 1.4 version available at the time of release.  

Installing MQ on Linux

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

Installing from the Web

The following instructions explain how to download and install the MQ product on Linux from the Sun ONE website.

To install MQ on Linux from the Web

  1. Accept the license agreement.

  2. Download the MQ product from the website into an empty, temporary download directory, temp_directory.

    The download tar file is: imq3_0-edition-linx86.tar.gz

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

  3. Uncompress the downloaded file.

    gunzip imq3_0-edition-linx86.tar.gz

    This creates a single tar file, imq3_0-edition-linx86.tar

  4. Become root on your system:

    su root

  5. Change to the /opt directory.

    cd /opt

    This is the recommended installation directory. If you install MQ into a root_path directory different from /opt, you will have to make the corresponding modifications to the steps that follow.

  6. Untar the archive:

    /bin/tar xvfp temp_directory/imq3_0-edition-linx86.tar

    The /opt/imq directory and its contents are created.

  7. If you plan to use the broker (see Table 1-2) as a user other than root, change permissions to allow reading and writing to the /opt/imq/var directory:

    chmod 777 /opt/imq/var

  8. Back up the imq3_0-edition-linx86.tar.gz file from your temporary working directory.

    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.

Installing from CD-ROM

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

To install MQ on Linux from CD-ROM

  1. Log in as root or change to superuser.

    For example, type the following at a command prompt:

    su root

    Then type your superuser password.

  2. Insert the Sun ONE Message Queue CD into your CD-ROM drive and mount it.

    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 installation tar file:

    cd /cdrom/linux

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

  4. Copy the MQ tar file from the CD directory into an empty, temporary working directory, temp_directory.

    The tar file is: imq3_0-edition-linx86.tar.gz

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

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

Configuring the Java Runtime for MQ

At startup time, a broker (the MQ 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).

    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 Editions

MQ comes in two editions, as explained in "Product Editions".

To upgrade from the Platform Edition to the Enterprise Edition, you need to install the Enterprise Edition license. This upgrade does not overwrite the MQ modules already installed and does not modify the configuration of your MQ messaging system.

To install the Enterprise Edition license you need only extract the license file contained in the Enterprise Edition and place it in your MQ installation directory.

To upgrade to Enterprise Edition on Linux

  1. Stop any running brokers.

    imqcmd shutdown bkr -u name -p password [-b hostName:port]

  2. Follow the installation procedure in "Installing from the Web", Step 1 through Step 4 or in "Installing from CD-ROM", Step 1 through Step 4.

  3. Change to the root_path directory (where MQ is installed).

    For example, change to /opt if MQ is installed in /opt/imq.

  4. Extract the MQ license file:

    /bin/tar xvf download_directory/imq3_0-ent-linx86.tar     imq/etc/lic/imqbrokerunl.lic

    This installs the license into the appropriate MQ directory.

  5. Verify that the Enterprise Edition license is available by running

    imqbrokerd -license

Where To Go Next

Read the README and MQ Release Notes (relnotes.html) files.

  • The README includes information on where to find documentation, news and updates, and how to send feedback.

  • The MQ Release Notes contain information on code and documentation changes, open bugs, and important technical notes. This document is available on the Sun ONE website.

For an overview of Sun ONE Message Queue concepts, a brief introduction to writing and compiling a client application, see the MQ Developer's Guide.

For details on configuring brokers and managing an MQ messaging system, see the MQ Administrator's Guide.

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

To uninstall the product, see the following section.

Uninstalling MQ on Linux

The following instructions explain how to uninstall MQ on Linux.

To remove MQ on Linux

  1. Stop any running client applications.

  2. Stop any running brokers.

    imqcmd shutdown bkr -u name -p password [-b hostName:port]

  3. Unless you want to retain dynamic broker data, remove all data files associated with each broker instance.

    imqbrokerd -name brokerName -remove instance

  4. If you wish to preserve the MQ flat file user repository and the MQ access control file, copy the following files to some safe location before removing MQ packages (they can be restored after re-installing or upgrading MQ):



  5. Become root:

    su root

  6. If you want to retain dynamic data for any reason, move /opt/imq/var to a temporary directory:

    mv -rf /opt/imq/var /tmp

  7. Remove the MQ product.

    Issue the /bin/rm command. For example, if the product is installed in /opt/imq you could type:

    rm -rf /opt/imq

Previous      Contents      Next     
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.

Last Updated June 20, 2002