Sun logo      Previous      Contents      Next     

Sun ONE Message Queue 3.0.1 SP2 Installation Guide

Chapter 2
Solaris Installation

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

Hardware and Software Requirements

At a minimum, your Solaris™ development system (SPARC™ Platform Edition) should satisfy the minimum requirements indicated in the following table.

Table 2-1  Hardware and Software Requirements for Solaris 



Operating system

Solaris 8 or Solaris 9 (SPARC platforms)
Solaris 9, update 4 or higher (SPARC and x86 platforms)

Note: To ensure proper operation of MQ, you should install all required Solaris Patches for Java 2. For the latest information about the patches and to download the recommended and required patches, see:


Sun Ultra™ 1 (or compatible) workstation that is TCP/IP networked


128 Mbytes

Hard drive space

The compressed installation file is approximately 6 Mbytes.

The temporary working directory used for extracting the installation files requires an additional 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.

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

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

Installing MQ on Solaris

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


If you are upgrading from MQ 3.0 or MQ 3.0.1 versions, it is recommended that you first uninstall MQ software, as described in the Installation Guide for that particular MQ release, before installing MQ 3.0.1, SP2.


Because MQ is installed with other products (such as Solaris 9 Update 2, Sun ONE Application Server 7.0, and possibly others), you might wish to check whether MQ has already been installed on your system. To do so, enter the following command:

pkginfo | grep SUNWiq

If MQ packages are already installed, you can check the version by entering:

pkginfo -l packageName

where packageName is any of the MQ packages.

Installing from the Web

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

    To install MQ on Solaris from the Web
  1. Download the MQ product from the website into an empty, temporary working directory.
  2. Run the command script:
  3. sh

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

    The command displays the first page of the license for the product.

  4. Read the product license. Installation and use of the product is subject to acceptance of the license agreement.
  5. To display the entire license, one page at a time, repeatedly press the space bar. When you reach the end of the license, the program prompts you to accept the license.
    • If you choose not to accept the license agreement, type no or n and the installation terminates.
    • If you choose to accept the license agreement, type yes or y and the installation continues. The following files are extracted:
      • README
      • imq3_0_1-edition-solsparc.tar.Z
      • LICENSE (a copy of the license agreement)
  6. Extract the archived files:
  7. /bin/zcat imq3_0_1-edition-solsparc.tar.Z | tar xvfp -

    A new directory, imq3_0_1-pkgs, is created.


    To avoid possible problems, do not use the GNU tar utility when installing MQ.

  8. Change directories:
  9. cd imq3_0_1-pkgs

  10. Become root:
  11. su root

  12. Determine which, if any, of the shared packages included with MQ are already installed on your system.
  13. To see a list of such packages, type:

    pkginfo SUNWaclg SUNWjaf SUNWjhrt SUNWjmail SUNWxsrt

    The output shows the packages already installed and those which cannot be found.

  14. Run the pkgadd command to install the packages:
  15. pkgadd -d ./

    The pkgadd utility lists the names of all packages in the directory available for installation (see Table 2-2). When prompted, indicate the packages you want to install. (Do not install any shared packages found in Step 8.)

    Table 2-2  Packages in Solaris Bundle 







    Apache Commons Logging Framework: API and runtime

    Required for SOAP/JAXM client support.



    MQ client API javadoc and example applications

    Needed only for client development.



    MQ JNDI File System Service Provider

    Required only for client development and administration tools that use the JNDI FIle System Service Provider. The JNDI Service Provider is not supported for deployment.



    MQ Java API for XML Messaging (JAXM): API and runtime

    Required for SOAP/JAXM client support.


    SUNWiqlpl or SUNWiqlen

    MQ license files for Platform or Enterprise Edition message server

    Depends on MQ edition.



    MQ message server root package

    Files needed for MQ executables.



    JNDI and JSSE jar files

    Needed for client development and deployment with JDK 1.2 and 1.3.



    MQ message server and administration tools.




    MQ JMS API and client runtime.

    Required for JMS client support.



    MQ JMS/SOAP Message Transformer API and runtime

    Required to perform conversions between SOAP messages and JMS messages.



    JavaBeans Activation Framework: API and runtime.

    Required for SOAP/JAXM client support.



    JavaHelp API and runtime

    Required if installing on Solaris 8. (Solaris 9 and above already have this package installed.) Will only install if a JVM 1.4 or greater has first been installed.



    JavaMail: API and runtime

    Required for SOAP/JAXM client support.



    SOAP with Attachments API for Java: API and runtime

    Required for SOAP/JAXM client support.

    The pkgadd utility installs the packages you specified, perhaps asking for additional information, and eventually returns to the original prompt, displaying the list of packages available for installation.

    Table 2-3 provides a guide to the packages you need for different use scenarios:

    Table 2-3  Packages Required for Various Scenarios 


    Packages Needed


    MQ message server and administration tools



    SUNWiqlpl or SUNWiqlen


    SUNWjhrt (optional)

    SUNWiqfs (optional)

    Required for a MQ message server to run on a host.

    Developing and/or deploying JMS clients


    SUNWiqdoc (optional)

    SUNWiqsup (optional)

    Can be installed on a system without a MQ message server.

    Developing and/or deploying SOAP/JAXM clients






    SUNWiqdoc (optional)

    Can be installed on a system without a MQ message server.

    Note: SOAP clients require JDK1.4

    Developing and/or deploying clients using the JMS/SOAP Message Transformer


    Plus all packages needed to support JMS and SOAP/JAXM clients

    Can be installed on a system without a MQ message server.

    The MQ Message Transformer API depends on both the JMS and SOAP APIs.

  16. Type q to quit.
  17. Exit the root shell.
  18. Back up the file from your temporary working directory.
  19. 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.

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

  21. Note

    Once installation is complete, to run the default broker instance (named imqbroker), you must be root—or, as root, change the privileges on the /var/imq/instnces/imqbroker directory (where configuration and persistent data are stored). However, if you run a non-default broker instance (using the -name brokerName option) then you automatically have privileges to the /var/imq/instnces/brokerName directory.

Installing from CD-ROM

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


A compressed installation file (tar.Z) is provided on the CD if you do not want to install MQ directly from the packages on the CD.

    To install MQ on Solaris from CD-ROM
  1. Log in as root or change to superuser.
  2. For example, type the following at a command prompt:

    su root

    Then type your superuser password.

  3. Insert the MQ CD into your CD-ROM drive.
  4. If the Volume Manager™ software is running on your machine, the CD-ROM is automatically mounted to the /cdrom/messagequeue3_0_1 directory.

    If the Volume Manager is not running on your machine:

    • Create a directory called /cdrom/messagequeue3_0_1 by typing:
    •   mkdir -p /cdrom/messagequeue3_0_1

    • Mount the CD-ROM manually:
    •   mount -rF hsfs cdrom-device /cdrom/messagequeue3_0_1

      An example of cdrom-device is /dev/dsk/c0t0d0s0.


      Volume Manager is a tool provided on Solaris that allows you to perform administrative tasks, such as mounting CD-ROMs, more easily. Volume Manager mounts a CD-ROM as /cdrom/name_of_media, where name_of_media is determined from the CD-ROM itself.

      Open and read (using your preferred text editor) the LICENSE file located in the solaris/ directory of the CD.

    • If you choose NOT to accept the license agreement, discontinue installation and contact the place where you purchased the product to determine the return policy.
    • If you choose to accept the agreement, continue with the installation steps below.
  5. Change to the directory on the CD containing the installation packages. For example, type:
  6. cd /cdrom/messagequeue3_0_1/solaris/imq3_0_1-pkgs

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

  7. Run the pkgadd command to install the packages:
  8. pkgadd -d ./

    The pkgadd utility lists the names of all packages in the directory available for installation. When prompted, indicate the packages you want to install (see Table 2-2).

  9. When the pkgadd prompt returns, type q to quit.
  10. Exit the root shell.

Configuring MQ for Automatic Startup

If you wish to set the broker (the MQ message server) for automatic startup, you need to become root and edit the following configuration file:


The startup properties you can set in this configuration file are shown in Table 2-4:

Table 2-4  Broker Startup Configuration Properties 

Property Name



Specifies (YES/NO) if the broker is automatically started at boot time. Default: NO


Specifies command line options and arguments to pass to the broker startup command. See the MQ Administrator’s Guide for a listing and description of imqbrokerd command line options. (For example -name brokerName)


Specifies (YES/NO) if the broker is automatically re-started if it abnormally exits. Default: YES

To check that startup changes are correct (without booting the system), you can, as root, explicitly run the MQ initialization script (S52imq) in “debug” mode:

env DEBUG=1 /etc/rc3.d/S52imq start

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

You must have the correct JDK/JRE installed to run MQ. For more information about which JDK/JRE is supported with MQ, see Table 1-1.

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.
  4. This is the JDK located in /usr/j2se

To figure 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 installation 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 the SUNWiqlen package contained in the Enterprise Edition. The SUNWiqlen package is placed automatically in the imq3_0_1-pkgs directory (Web installation) or in the solaris/imq3_0_1-pkgs directory (CD-ROM installation) as a result of running the installation command script, uncompressing the file archive, and extracting the archived files.

    To upgrade to Enterprise Edition on Solaris
  1. Stop any running brokers.
  2. imqcmd shutdown bkr -u name -p password [-b hostName:port]

  3. Follow the installation procedure in Installing from the Web, Step 1 through Step 6 or in Installing from CD-ROM, Step 1 through Step 3.
  4. When the installation is finished, add the SUNWiqlen package:
  5. pkgadd -d . SUNWiqlen

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

Where To Go Next

Read the README and MQ Release Notes files.

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 /usr/share/javadoc/imq directory.

To uninstall the product, see the following section.

Uninstalling MQ on Solaris

The following instructions explain how to uninstall MQ.

    To remove MQ on Solaris
  1. Stop any running client applications.
  2. Stop any running brokers.
  3. imqcmd shutdown bkr -u name -p password [-b hostName:port]

  4. Unless you want to retain dynamic broker data, remove all data files associated with each broker instance.
  5. imqbrokerd -name brokerName -remove instance

  6. 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):
  7. /etc/imq/passwd


  8. Determine which MQ packages are installed.
  9. To see a list of MQ packages installed on your system using pkginfo, type:

    pkginfo | grep SUNWiq

    The output does not show shared packages (SUNWaclg, SUNWjaf, SUNWjhrt, SUNWjmail, and SUNWxsrt) installed by MQ on your system. Unless you are updating to a later version of MQ, (and thereby replacing these shared packages with updated versions) it is recommended that you do not remove shared packages.

  10. Become root by typing:
  11. su root

    When prompted, type your root password.

  12. Remove the MQ packages that were installed with pkgadd.
  13. Issue the following command:

    pkgrm packageName

    where packageName is any of the MQ packages or shared packages that were installed with pkgadd. To remove multiple packages, separate the package names by a space.

    Because other products might be using MQ packages, be careful about removing them. The pkgrm command will warn you of any dependencies on a package before removing it.

  14. When prompted, confirm your removal request by typing y.

Previous      Contents      Next     

Copyright 2004 Sun Microsystems, Inc. All rights reserved.