Sun ONE Message Queue 3.0.1 SP2 Installation Guide |
Chapter 3
Linux InstallationThis chapter explains the following topics as they apply to a Linux installation:
Hardware and Software RequirementsAt 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
Component
Requirements
Operating system
Red Hat Advanced Server 7.1
CPU
Intel Pentium 2 (or compatible)
RAM
256 Mbytes
Disk Space
The zip file containing the product is approximately 9 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 Linux.
The MQ software distribution CD includes the required JRE version at the time of release.
Installing MQ on LinuxThe 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.
Finding and Removing Earlier MQ Versions
Because MQ is installed with other products (Sun ONE Application Server 7.0, and possibly others), you should check whether MQ has already been installed on your system, and uninstall it before installing MQ 3.0.1, SP2.
If you find that an earlier version of MQ is already on your system, you need to decide if you want to preserve any security-related data (flat-file user repository, access control file). If so, you need copy these files to some safe location before uninstalling MQ.
Depending on the version, MQ might have been installed using tar files or the Red Hat Package Manager (RPM). To check for installed versions, therefore, you need to check for both. It is recommended that you check first for RPM installations and then for tar file installations.
Finding and Removing MQ RPMs (Version 3.0.1 SP1 or Later Only)
To find and remove earlier RPM-installed versions of MQ:
- Enter the following command:
rpm -qa | grep imq
If found, the version numbers of any RPMs are imbedded in the RPM name. If none are found, proceed to Finding and Removing an MQ tar-based Installation.
- If you find any MQ RPMs, back up instance data and security-related files from the previous version, and remove the product as follows:
Finding and Removing an MQ tar-based Installation
To find and remove earlier tar-based installed MQ
- See if the default MQ installation directory (/opt/imq/bin) exists on your system.
If found, proceed to Step 2.
If not found, MQ might have been installed in a non-default location. If you cannot remember the installation directory, search for the MQ imqbrokerd executable and note its root install directory. Proceed to Step 2.
If there is no previous MQ installation, proceed to install MQ by following the directions in Installing from the Web or Installing from CD-ROM.
- If you find an earlier MQ installation in the default location (/opt/imq/bin), back up instance data and security-related files from the previous version, and remove the product as follows:
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
- Accept the license agreement on the MQ product download site.
- Download the MQ product distribution file from the website into an empty, temporary download directory, temp_directory.
The download file is: imq3_0_1-edition-linx86.zip
where edition takes one of the following values: plt or ent, depending on whether you are installing the Platform Edition or Enterprise Edition, respectively.
- Change to the temp_directory and unzip the distribution file.
unzip imq3_0_1-edition-linx86.zip
The unzip command places the distribution files in the temporary directory: LICENSE, README, THIRDPARTYLICENSEREADME, and COPYRIGHT files; and an rpms directory that contains the following RPMs:
imq-3.0.1-03.i386.rpm
(included in both Platform and Enterprise Editions)imq-ent-3.0.1-03.i386.rpm
(included in Enterprise Edition only)- 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.
- Install the appropriate RPMs:
rpm -ivh rpms/imq-3.0.1-03.i386.rpm
(both Platform and Enterprise Edition)rpm -ivh rpms/imq-ent-3.0.1-03.i386.rpm
(Enterprise Edition only)The /opt/imq directory and its contents are created, and files are placed in other locations as well (see Installed Directory Structure).
- Back up the imq3_0_1-edition-linx86.zip 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 Linux from CD-ROM.
To install MQ on Linux from CD-ROM
- 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.
- Change to the directory on the CD containing the MQ distribution:
cd /mnt/cdrom/linux
The contents of this directory vary depending on the MQ product edition.
- 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.
- Install the appropriate RPMs:
rpm -ivh rpms/imq-3.0.1-03.i386.rpm
(both Platform and Enterprise Edition)rpm -ivh rpms/imq-ent-3.0.1-03.i386.rpm
(Enterprise Edition only)The /opt/imq directory and its contents are created, and files are placed in other locations as well (see Installed Directory Structure).
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/JRE. The broker will pick up the latest version JDK/JRE installed on the system (greater than 1.4.1 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 from Platform to Enterprise EditionMQ comes in two editions, as explained in Product Editions.
To upgrade from the Platform Edition to the Enterprise Edition, you need to first purchase the Enterprise Edition, and then install, as described below, only the Enterprise Edition license contained in the distribution. Installation of the license does not overwrite the MQ 3.0.1, SP2 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
- 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 4 or in Installing from CD-ROM, Step 1 through Step 3.
- Install the MQ Enterprise Edition RPM.
rpm -ivh rpms/imq-ent-3.0.1-03.i386.rpm
This installs the Enterprise Edition license into the appropriate MQ directory.
- Verify that the Enterprise Edition license is available by running
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 /opt/imq/javadoc directory.
To uninstall the product, see the following section.
Uninstalling MQ on LinuxThe following instructions explain how to uninstall MQ on Linux.
To remove MQ on Linux
- 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 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
- Become root:
su root
- Remove the MQ product.
Issue the following command(s) in the following order: