Sun Java System Message Queue 3.7 UR1 Installation Guide

Installing Message Queue

The Message Queue 3.7 UR1 product can be downloaded from the Sun Java System Web site. Message Queue also depends on components that you must install in order to develop and run Message Queue clients. See Table 1–1 and Table 1–2 for more information.

Finding and Removing Earlier Message Queue Versions

Because Message Queue is installed with other products (such as Sun Java System Application Server), you should check whether an earlier version has already been installed on your system and, if so, uninstall it before installing Message Queue 3.7 UR1.

Migrating Files from an Earlier Installation

If Message Queue Version 3.0.x or 3.5 is already installed on your system and you want to preserve any of its instance data files (flat-file user repository, access control properties file, or password file), you will need to use the mqmigrate utility to migrate those files before uninstalling the earlier version of Message Queue. If you do not want to preserve your old data files, there is no need to run the mqmigrate utility.

Before you run the mqmigrate utility, you must be root.

su root

When prompted, enter your root password.

The mqmigrate utility assumes that the data files to be migrated are located in the standard directories shown in Table 3–2. In Message Queue 3.0.x installations, the base directory baseDir is assumed by default to be /opt, but the files may be installed in another, nonstandard base directory instead. The mqmigrate command provides an option, -basedir, for designating an alternate base directory from which to migrate the files:

./mqmigrate [-basedir baseDir]

For example, if the earlier installation's data files reside in a directory named, /export, you would migrate them with the command

./mqmigrate -basedir /export

Table 3–2 Message Queue Standard Data Directories

Message Queue Version 

Standard Data Directories 







3.7 UR1 


Removing an Earlier Installation

Depending on the version, Message Queue might have been installed using either .tar files or the Red Hat Package Manager (RPM). You must therefore check for both of these installation methods. It is recommended that you check first for RPM installations and then for .tar file installations.

ProcedureTo Find and Remove Earlier RPM-Installed Versions of Message Queue

  1. Check your system for an existing Message Queue installation.

    Enter the command

    imqbrokerd -version

    If an earlier version of Message Queue is already installed, the version number is displayed.

    • If no previous Message Queue installation is present, you can proceed to install Message Queue 3.7 UR1, as described in Installation Procedure.

    • If you do find an existing Message Queue installation, go on to the next step.

  2. Become root.

    su root

    Enter you root password.

  3. (Optional) Migrate data files from the existing installation.

    If the existing installation is of Message Queue Version 3.5 or earlier and you want to preserve its existing data files, use the command


    to migrate the installation's broker configuration files, persistent data, and security-related files to their proper locations for your planned Message Queue 3.7 UR1 installation. (This step is not necessary if the existing installation is of Message Queue 3.6 or later.)

    Note –

    If you are migrating from a Message Queue 3.0.x installation located in a base directory other than the default (/opt), use the mqmigrate command's -basedir option to specify the alternate base directory. For example, if the existing installation resides in a base directory named /export, use the following command to migrate its data files.

    ./mqmigrate -basedir /export

    If you do not know the correct base directory, you can find it by searching for the Message Queue imqbrokerd executable and noting its root installation directory.

  4. Remove the existing Message Queue installed software.

    Issue the following command(s) in the following order:

    • For Message Queue Version 3.5 or earlier:

      rpm -e imq-ent

      rpm -e imq

    • For Message Queue version 3.6 or 3.7:

      List Message Queue installed packages using the following command.

      rpm -qa | grep mq

    Remove listed packages using the following syntax:

    rpm -e pack1 [[,pack2]...]

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

    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.

    If there is no previous Message Queue installation, proceed to install Message Queue by following the directions in Installation Procedure.

  2. If you find an earlier Message Queue installation in the default location (/opt/imq/bin), remove it as follows:

    1. If you want to preserve existing broker instance data, run the mqmigrate utility (in the Message Queue 3.7 UR1 distribution) as described in Migrating Files from an Earlier Installation.

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

    2. Remove the /opt/imq/ directory and all its contents.

      rm -rf /opt/imq

Installation Procedure

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

ProcedureTo Install Message Queue on Linux

  1. Accept the license agreement on the Message Queue product download site.

  2. Download the Message Queue product distribution file from the Web site into an empty, temporary download directory, temp_directory.

    The download file is:

  3. Change to the temp_directory and uncompress the distribution file.


    The unzip command creates an mq3_7-ent directory, which contains the distribution files: LICENSE, README, and COPYRIGHT files; mqinstall utility; mquninstall utility; mqmigrate utility; and an rpms directory.

    The following table describes the Message Queue RPM packages in the rpms directory. If any of these files already exist on your system, you need to check whether the version number is greater than that provided by Message Queue. If it is, you should do a custom install.





    /etc files



    /var files



    /opt files for the Message Queue Core RPM

    Depends on the files 






    Message Queue Java API for XML Messaging (JAXM): API 

    Depends on sun-saaj.


    JMS: API and runtime 

    No dependencies 


    XML Client 

    Depends on sun-jmsclient and sun-saaj.



    Depends on sun-nspr, sun-nss.


    Symlinks to 3.5 locations. 

    Depends on sun-mq.

    Not installed by default. Use if your existing client applications contain scripts that depend upon former file locations (such as jar files). 


    L10N files 

    No dependencies. 


    Legacy Enterprise license file. 

    No longer used. 

    sun-javahelp [This package is shared by a number of Sun Java System products. This package is not installed by default. You must manually install any shared packages after installing Message Queue packages.]

    JavaHelp: API and runtime 

    Supports JavaHelp viewer for Admin Console help. 

    This RPM is not installed by default. 


    Network Security Services (NSS) libraries. 

    Needed to support C language clients. 

    This RPM is not installed by default. 


    Netscape Portable Runtime (NSPR) libraries 

    Needed to support C clients. 

    This RPM is not installed by default. 


    SOAP with Attachments API for Java: API and runtime 

    Required to support Java clients using SOAP/JAXM API. 

    This RPM is not installed by default. 


    Message Queue Java API for XML Processing (JAXP): API and runtime 

    Required to support Java clients using SOAP/JAXM API. 

    This RPM is not installed by default. 


    JavaMail: API and runtime 

    Required to support Java clients using SOAP/JAXM API. 

    This RPM is not installed by default. 


    JavaBeans Activation Framework: API and runtime 

    Required to support Java clients using SOAP/JAXM API. 

    This RPM is not installed by default. 

  4. Change to the directory containing the Message Queue distribution files.

    cd mq3_7-ent

  5. Log in as root or change to superuser.

    For example, type the following at a command prompt:

    su root

    When prompted, type your root password.

    Note –

    Remember to migrate data if necessary. See Migrating Files from an Earlier Installation for more information.

  6. If you intend to install all of the Message-Queue-specific RPM packages (packages which start with sun-mq), you will need to run the mqinstall script.

    Please note that the install script will overwrite all Message-Queue-specific RPM packages, and will not install any shared RPM packages. You must install shared RPM packages manually, as described in Step 7.

    1. Run the mqinstall script.


      The script lists the distribution RPM packages including their version numbers, if any, that are already installed, and then lists the RPM packages about to be installed.

      Note –

      If any of the Message Queue RPM packages listed is already installed and its version is newer, then you will probably not want to install the corresponding Message Queue RPM package. In that case, enter n (no) and continue with Step 7.

      The mqinstall script does not install the sun-mq-compat RPM package by default and you should only have it installed if you need it. For example, if your existing client applications contain scripts that depend upon former file locations (such as jar files), you will need to install the sun-mq-compat RPM package. To install this RPM package, see Step 7.

    2. Enter y (yes) if you want to install all the Message-Queue-specific RPM packages. Otherwise, enter n (no) and continue with Step 7.

      If you run the script, it creates a log file in the following directory:


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

  7. If you want to install a subset of the Message QueueRPM packages, if you want to install shared RPM packages, or if you do not want to overwrite later versions of RPM packages, do the following:

    1. Change to the rpms directory.

      cd rpms

    2. Run the rpm install command to install the RPM packages.

      rpm -ivh --nodeps rpmPkg1.rpm rpmPkg2.rpm rpmPkg3.rpm

  8. Back up the 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.

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

    Note –

    The instance data for any pre-existing broker instance is owned by the user that 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/sun/mq/instances/instanceName directory. This applies to the default broker instance (named imqbroker) as well.

Installed Directory Structure

Table 3–3 shows the installed directory structure for a full (all RPMs) installation of Message Queue 3.7 UR1 on the Linux platform. (The directory structure may vary if you perform a partial installation.)

Note –

File locations for Message Queue bundled with Sun Java System Application Server may differ from those shown in the table.

Table 3–3 Installed Directory Structure (Linux)



COPYRIGHT(not installed)

Copyright text file 


Evidence of purchase 


Lists redistributable files 

LICENSE (not installed)

License text file 

README(not installed)

README text file 


NSS/NSPR license 


Executable files for the following 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)


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


Files needed for JDBC-based persistence


Support files for Message Queue tools and processes 


Broker's default configuration files 


Message Queue help files 


Admin GUI image files 


Message Queue and JMS API documentation in JavaDoc format


Example Java client applications 


Header files to support C client applications 


Message Queue working storage 


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


License files, instance template files, and rc script configuration files for automatic startup