Sun ONE Message Queue 3.0.1 SP2 Installation Guide |
Chapter 2
Solaris InstallationThis chapter explains the following topics as they apply to a Solaris installation:
Hardware and Software RequirementsAt 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
Component
Requirements
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:
CPU
Sun Ultra 1 (or compatible) workstation that is TCP/IP networked
RAM
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 SolarisThe MQ product can be downloaded from the Sun ONE website or installed from the product CD-ROM. See the appropriate section below for details.
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
- Download the MQ product from the website into an empty, temporary working directory.
- Run the command script:
sh imq3_0_1-edition-solsparc.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.
- Read the product license. Installation and use of the product is subject to acceptance of the license agreement.
- 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.
- Extract the archived files:
/bin/zcat imq3_0_1-edition-solsparc.tar.Z | tar xvfp -
A new directory, imq3_0_1-pkgs, is created.
- Change directories:
cd imq3_0_1-pkgs
- Become root:
su root
- Determine which, if any, of the shared packages included with MQ are already installed on your system.
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.
- Run the pkgadd command to install the packages:
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.)
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:
- Type q to quit.
- Exit the root shell.
- Back up the imq3_0_1-edition-solsparc.sh 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.
- Clean up all remaining files in your temporary working directory.
Installing from CD-ROM
The following instructions explain how to install the MQ product on Solaris from CD-ROM.
Note
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
- Log in as root or change to superuser.
For example, type the following at a command prompt:
su root
Then type your superuser password.
- Insert the MQ CD into your CD-ROM drive.
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.
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.
- Change to the directory on the CD containing the installation packages. For example, type:
cd /cdrom/messagequeue3_0_1/solaris/imq3_0_1-pkgs
The contents of this directory vary depending on the product edition.
- Run the pkgadd command to install the packages:
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).
- When the pkgadd prompt returns, type q to quit.
- Exit the root shell.
Configuring MQ for Automatic StartupIf you wish to set the broker (the MQ message server) for automatic startup, you need to become root and edit the following configuration file:
/etc/imq/imqbrokerd.conf
The startup properties you can set in this configuration file are shown in Table 2-4:
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 MQAt 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:
- 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).
- Set the JDK or JRE in the IMQ_JAVAHOME environment variable.
- Let the broker use the installed JDK.
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 EditionsMQ 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
- Stop any running brokers.
imqcmd shutdown bkr -u name -p password [-b hostName:port]
- 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.
- When the installation is finished, add the SUNWiqlen package:
pkgadd -d . SUNWiqlen
- Verify that the Enterprise Edition license is available by running the following command:
imqbrokerd -license
Where To Go NextRead 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 SolarisThe following instructions explain how to uninstall MQ.
To remove MQ on Solaris
- Stop any running client applications.
- Stop any running brokers.
imqcmd shutdown bkr -u name -p password [-b hostName:port]
- Unless you want to retain dynamic broker data, remove all data files associated with each broker instance.
imqbrokerd -name brokerName -remove instance
- 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):
/etc/imq/passwd
/etc/imq/accesscontrol.properties
- Determine which MQ packages are installed.
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.
- Become root by typing:
su root
When prompted, type your root password.
- Remove the MQ packages that were installed with pkgadd.
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.
- When prompted, confirm your removal request by typing y.