|
|
| Sun ONE Message Queue, Version 3.0.1 Installation Guide |
This chapter explains the following topics as they apply to a Linux installation:
- Hardware and Software Requirements
- Installing MQ on Linux
- Configuring the Java Runtime for MQ
- Upgrading Editions
- Where To Go Next
- Uninstalling MQ on Linux
Hardware and Software Requirements
At 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 Linux 7.2
CPU
Intel Pentium 166 MHz (or compatible) PC that is TCP/IP networked
RAM
128 Mbytes
Hard drive space
The GNUZIP tar file containing the product is approximately 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 Linux.
The MQ software distribution CD includes the required JRE version at the time of release.
Installing MQ on Linux
The 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.
Note If you are upgrading from MQ 3.0, it is recommended that you first uninstall MQ 3.0 software, as described in the MQ 3.0 Installation Guide, before installing MQ 3.0.1.
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.
- Download the MQ product from the website into an empty, temporary download directory, temp_directory.
The download tar file is: imq3_0_1-edition-linx86.tar.gz
where edition takes one of the following values: plt or ent, depending on whether you are installing the Platform Edition or Enterprise Edition, respectively.
- Uncompress the downloaded file.
gunzip imq3_0_1-edition-linx86.tar.gz
This creates a single tar file, imq3_0_1-edition-linx86.tar
- Become root on your system:
su root
- Change to the /opt directory.
cd /opt
This is the recommended installation directory. If you install MQ into a root_path directory different from /opt, you will have to make the corresponding modifications to the steps that follow.
- Untar the archive:
/bin/tar xvfp temp_directory/imq3_0_1-edition-linx86.tar
The /opt/imq directory and its contents are created.
- If you plan to use the broker (see Table 1-2) as a user other than root, change permissions to allow reading and writing to the /opt/imq/var directory:
chmod 777 /opt/imq/var
- Back up the imq3_0_1-edition-linx86.tar.gz 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.
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
- 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 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 installation tar file:
cd /cdrom/linux
The contents of this directory vary depending on the MQ product edition.
- Copy the MQ tar file from the CD directory into an empty, temporary working directory, temp_directory.
The tar file is: imq3_0_1-edition-linx86.tar.gz
where edition takes one of the following values: plt or ent, depending on whether you are installing the Platform Edition or Enterprise Edition, respectively.
- Continue with Step 3 under "Installing from the Web".
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). 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 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 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 upgrade 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 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 4.
- Change to the root_path directory (where MQ is installed).
For example, change to /opt if MQ is installed in /opt/imq.
- Extract the MQ license file:
/bin/tar xvf download_directory/imq3_0_1-ent-linx86.tar
imq/etc/lic/imqbrokerunl.lic
This installs the license into the appropriate MQ directory.
- Verify that the Enterprise Edition license is available by running
imqbrokerd -license
Where To Go Next
Read the README and MQ Release Notes files.
- The README includes information on where to find documentation, news and updates, and how to send feedback.
- The MQ Release Notes contain information on code and documentation changes, open bugs, and important technical notes. This document is available on the Sun ONE website.
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 IMQ_HOME/javadoc directory.
To uninstall the product, see the following section.
Uninstalling MQ on Linux
The 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 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):
IMQ_HOME/etc/passwd
IMQ_HOME/etc/accesscontrol.properties
- Become root:
su root
- If you want to retain dynamic data for any reason, move /opt/imq/var to a temporary directory:
mv -rf /opt/imq/var /tmp
- Remove the MQ product.
Issue the /bin/rm command. For example, if the product is installed in /opt/imq you could type:
rm -rf /opt/imq