Sun ONE Message Queue 3.5 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 system (SPARC or X86) should satisfy the requirements indicated in the following table.
Table 2-1 Hardware and Software Requirements for Solaris
Component
Requirements
Operating system
Solaris 8, Solaris 9, (SPARC platforms)
Solaris 9 (X86 platform)
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 UltraSPARC
Intel Pentium 2 (or compatible)
RAM
256 Mbytes
Disk space
The compressed installation file is approximately 9 Mbytes.
The temporary working directory used for extracting the installation files requires an additional 9 Mbytes.
The installed product requires approximately 9 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.
Installed Directory Structure
The install image below reflects a full (all packages) Solaris installation. This image might vary if you perform a partial installation.
Note
File locations for MQ bundled with Sun ONE Application Server, may differ from locations specified in Table 2-2.
Table 2-2 Installed Directory Structure: Solaris
Solaris
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 MQ: DOM4J, Apache Commons Logging
README
(not installed)README text file
/usr/bin/
Contains the executables for the broker (imqbrokerd) and the following MQ administration tools:
/usr/share/lib/
Contains files that support the MQ 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 MQ resource adapter
/usr/share/lib/imq/
Contains files used to support MQ 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 MQ help files
/images
/etc/imq/
Contains license files, instance template files, and rc script configuration files that can be used for automatic startup
/var/imq/
Working storage directory for MQ.
/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
/usr/share/
javadoc/imq/Contains the MQ and JMS API documentation distributed as Javadoc (HTML)
/usr/demo/imq/
Source code for and instructions on how to run Java client example applications:
/opt/SUNWimq/
include/Header files needed to support MQ C clients (Enterprise Edition only)
/opt/SUNWimq/
lib/Libraries needed to support MQ C clients (Enterprise Edition only)1
/opt/SUNWimq/
demo/C/Examples for writing C clients (Enterprise Edition only)
1. See Table 1-2 for the versions of NSPR and NSS needed to support the C-API.
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
- Read the product license. Installation and use of the product is subject to acceptance of the license agreement.
- Download the MQ product distribution file from the website into an empty, temporary working directory, temp_directory.
The zipped distribution file name depends on the MQ edition and hardware platform:
Table 2-3 MQ 3.5 Solaris Distribution Files
Edition
SPARC
X86
Platform
imq3_5-plt-solsparc.zip
imq3_5-plt-soli386.zip
Enterprise
imq3_5-ent-solsparc.zip
imq3_5-ent-soli386.zip
- Change directories:
cd temp_directory
- Unzip the distribution file.
unzip imq3_5-edition-platform.zip
where edition is plt or ent, depending on the edition, and platform is solsparc or soli386, depending on the platform.
The unzip command creates a mq3_5-edition directory which contains the distribution files: LICENSE, README, LICENSEREADME\THIRDPARTYLICENSEREADME, and COPYRIGHT files; install and uninstall scripts; a patches directory; and a pkgs directory that contains the MQ packages.
Table 2-4 describes the MQ packages, and Table 2-5 provides a guide to the packages you need for different use scenarios. In addition, if any of these files already exist on your system, you need to check whether the patch revision number is greater than that provided by MQ. If it is, you should do a custom install.
Table 2-5 provides a guide to the packages you need for different use scenarios:
- Change to the directory containing the MQ distribution files.
cd mq3_5-edition
- Become root:
su root
When prompted, type your root password.
- Check your system for patches to any of the non-MQ-specific packages listed in Table 2-4 (packages which do not begin with SUNWiq and which might already be installed on your system). Enter the following command to check for patches:
showrev -a
Output indicating incompatible patches looks like this:
Patch: 114045-05 Obsoletes: Requires: Incompatibles:
Packages: SUNWpr, SUNWtlsIf patches are shown to packages listed in Table 2-4, you might not want to install those particular MQ packages, and you should pay close attention to Step 8a.
If you mistakenly downgrade your NSS or NSPR packages back to the unpatched versions, you can upgrade to the patched versions by installing the patches that are included in the MQ solaris bundle:
- If you intend to install all the packages listed in Table 2-4, you will need to run the mqinstall script. Please note that this script will overwrite all the listed packages.
- run the mqinstall script.
./mqinstall
The script lists the distribution packages, if any, that are already installed, and then lists the packages about to be installed.
Note
If any of the patches found in Step 7 are packages that are already installed, then you will probably not want to install the corresponding MQ packages. In that case, enter n (no) and continue with Step 9.
Note
The mqinstall utility does not install package #9 (SUNWiqsup) in Table 2-4. If you are doing client development using JDK 1.2 or 1.3, you will need to install the SUNWiqsup package as described in Step 9.
- Enter y (yes) if you want to install all the packages, and skip to Step 10. Otherwise, enter n (no) and continue with Step 9.
If you run the script, it creates a log file in the following directory:
/var/sadm/install/logs/
- If you do not want to install all of the packages listed in Table 2-4 (you want only a subset, or you don’t want to over-write later versions of packages),
- change to the pkgs directory
cd pkgs
- run the pkgadd command to install the packages you want:
pkgadd -d ./ -a admin.conf
The pkgadd utility lists the names of all packages in the directory available for installation (see Table 2-4). When prompted, indicate the packages you want to install. (The -a admin.conf option permits an over-write of any packages that are already installed on your system.)
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.
- Type q to quit.
- Exit the root shell.
- Back up the zip distribution file from your temporary working directory.
This is your logical media. It will be needed to uninstall or reinstall MQ. Treat this file as you would any other installation media and place a copy in a safe location.
- Clean up all remaining files in your temporary working directory. For your convenience, you should save the uninstall script.
Installing from CD-ROM
The following instructions explain how to install the MQ product on Solaris from CD-ROM.
Note
A compressed installation file (zip) 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_5 directory.
If the Volume Manager is not running on your machine:
- Create a directory called /cdrom/messagequeue3_5 by typing:
mkdir -p /cdrom/messagequeue3_5
- Mount the CD-ROM manually:
mount -rF hsfs cdrom-device /cdrom/messagequeue3_5
An example of cdrom-device is /dev/dsk/c0t0d0s0.
Open and read (using your preferred text editor) the LICENSE file located in the solaris-sparc/ or solaris-x86/ 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_5/solaris-sparc
or
cd /cdrom/messagequeue3_5/solaris-x86
The contents of this directory vary depending on the product edition.
- Continue with Step 6 under "Installing from the Web.".
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-6:
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). 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 from Platform to Enterprise EditionMQ comes in two editions, as explained in "Product Editions". Upgrading from the Platform to Enterprise Edition must be done at the same version level; that is, you can upgrade from Platform Edition 3.5 to Enterprise Edition 3.5, but you cannot upgrade from Platform Edition 3.0.1 to Enterprise Edition 3.5
To upgrade from the Platform Edition to the Enterprise Edition, you need to first purchase the Enterprise Edition, and then install, as described below, the Enterprise Edition license contained in the distribution, plus the C-API packages, if you wish to write C client programs. Installation of these packages does not overwrite the MQ 3.5 modules already installed and does not modify the configuration of your MQ messaging system.
To upgrade to the Enterprise Edition, you need only the following packages:
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.
- Add the Enterprise Edition packages:
- Change to the pkgs directory
cd pkgs
- Run the pkgadd command to install the packages in Table 2-7 that you want; you might want only a subset, or you might not want to over-write later versions of packages. For example:
pkgadd -d . SUNWiqlen
- Type q to quit.
- 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 Message Queue concepts, a brief introduction to writing and compiling a client application, see the MQ Java Client 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]
- If you want to delete dynamic data, the MQ flat-file user repository, and the MQ access control file associated with each broker instance, remove this data using the following command.
imqbrokerd -name instanceName -remove instance
- Get the uninstall script from the distribution CD or follow Step 5 through Step 7. If you already have the uninstall script you can proceed to Step 8.
- Find the zipped distribution file used to install MQ (see Step 11) and place it in a temporary directory, temp_directory.
- Change directories to temp_directory:
cd temp_directory
- Unzip the distribution file.
unzip imq3_5-edition-platform.zip
where edition is plt or ent, depending on the edition, and platform is solsparc or soli386, depending on the platform.
- Change to the directory containing the MQ packages.
cd mq3_5-edition
- Become root:
su root
When prompted, type your root password.
- Run the un-install script.
./mquninstall
The installation script lists MQ packages that are not shared, if any, that are currently installed. (It does not list shared MQ packages installed with MQ, and which might be in use by other programs.)
- If you want to un-install all the listed packages, enter y (yes), and skip to Step 16. Otherwise, continue with Step 12.
- If you do not want to un-install all of the MQ packages, then enter n (no), and use the pkgrm command, as described in Step 13, to un-install the specific packages you want to remove.
- Remove the MQ packages, using the following command:
pkgrm packageName
where packageName is any of the MQ packages. 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.
- Type q to quit.
- Exit the root shell.