The Message Queue 3.7 UR1 product can be downloaded from the Sun Java System Web site. Message Queue also depends on components that you must install in order to develop and run Message Queue clients. See Table 1–1 and Table 1–2 for more information.
Because Message Queue is installed with other products (such as Sun Java System Application Server), you should check whether an earlier version has already been installed on your system and, if so, uninstall it before installing Message Queue 3.7 UR1.
If Message Queue Version 3.0.x or 3.5 is already installed on your system and you want to preserve any of its instance data files (flat-file user repository, access control properties file, or password file), you will need to use the mqmigrate utility to migrate those files before uninstalling the earlier version of Message Queue. If you do not want to preserve your old data files, there is no need to run the mqmigrate utility.
Before you run the mqmigrate utility, you must be root.
su root
When prompted, enter your root password.
The mqmigrate utility assumes that the data files to be migrated are located in the standard directories shown in Table 3–2. In Message Queue 3.0.x installations, the base directory baseDir is assumed by default to be /opt, but the files may be installed in another, nonstandard base directory instead. The mqmigrate command provides an option, -basedir, for designating an alternate base directory from which to migrate the files:
./mqmigrate [-basedir baseDir]
For example, if the earlier installation's data files reside in a directory named, /export, you would migrate them with the command
./mqmigrate -basedir /export
Table 3–2 Message Queue Standard Data Directories
Message Queue Version |
Standard Data Directories |
---|---|
3.0.x |
baseDir/imq/var baseDir/imq/etc |
3.5 |
/var/opt/imq /etc/opt/imq |
3.6 |
/var/opt/sun/mq /etc/opt/sun/mq |
3.7 UR1 |
/var/opt/sun/mq /etc/opt/sun/mq |
Depending on the version, Message Queue might have been installed using either .tar files or the Red Hat Package Manager (RPM). You must therefore check for both of these installation methods. It is recommended that you check first for RPM installations and then for .tar file installations.
Check your system for an existing Message Queue installation.
Enter the command
imqbrokerd -version
If an earlier version of Message Queue is already installed, the version number is displayed.
If no previous Message Queue installation is present, you can proceed to install Message Queue 3.7 UR1, as described in Installation Procedure.
If you do find an existing Message Queue installation, go on to the next step.
Become root.
su root
Enter you root password.
(Optional) Migrate data files from the existing installation.
If the existing installation is of Message Queue Version 3.5 or earlier and you want to preserve its existing data files, use the command
./mqmigrate
to migrate the installation's broker configuration files, persistent data, and security-related files to their proper locations for your planned Message Queue 3.7 UR1 installation. (This step is not necessary if the existing installation is of Message Queue 3.6 or later.)
If you are migrating from a Message Queue 3.0.x installation located in a base directory other than the default (/opt), use the mqmigrate command's -basedir option to specify the alternate base directory. For example, if the existing installation resides in a base directory named /export, use the following command to migrate its data files.
./mqmigrate -basedir /export
If you do not know the correct base directory, you can find it by searching for the Message Queue imqbrokerd executable and noting its root installation directory.
Remove the existing Message Queue installed software.
Issue the following command(s) in the following order:
For Message Queue Version 3.5 or earlier:
rpm -e imq-ent
rpm -e imq
For Message Queue version 3.6 or 3.7:
List Message Queue installed packages using the following command.
rpm -qa | grep mq
Remove listed packages using the following syntax:
rpm -e pack1 [[,pack2]...]
See if the default Message Queue installation directory (/opt/imq/bin) exists on your system.
If not found, Message Queue might have been installed in a non-default location. If you cannot remember the installation directory, search for the Message Queue imqbrokerd executable and note its root install directory.
If there is no previous Message Queue installation, proceed to install Message Queue by following the directions in Installation Procedure.
If you find an earlier Message Queue installation in the default location (/opt/imq/bin), remove it as follows:
If you want to preserve existing broker instance data, run the mqmigrate utility (in the Message Queue 3.7 UR1 distribution) as described in Migrating Files from an Earlier Installation.
The mqmigrate utility moves existing broker instance data (broker configuration files and persistent data) and security-related files, to new Message Queue 3.7 UR1 locations.
Remove the /opt/imq/ directory and all its contents.
rm -rf /opt/imq
The following instructions explain how to download and install the Message Queue product on Linux from the Sun Java System Web site.
Accept the license agreement on the Message Queue product download site.
Download the Message Queue product distribution file from the Web site into an empty, temporary download directory, temp_directory.
The download file is: mq3_7-ent-linx86.zip
Change to the temp_directory and uncompress the distribution file.
unzip mq3_7-ent-linx86.zip
The unzip command creates an mq3_7-ent directory, which contains the distribution files: LICENSE, README, and COPYRIGHT files; mqinstall utility; mquninstall utility; mqmigrate utility; and an rpms directory.
The following table describes the Message Queue RPM packages in the rpms directory. If any of these files already exist on your system, you need to check whether the version number is greater than that provided by Message Queue. If it is, you should do a custom install.
Change to the directory containing the Message Queue distribution files.
cd mq3_7-ent
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.
Remember to migrate data if necessary. See Migrating Files from an Earlier Installation for more information.
If you intend to install all of the Message-Queue-specific RPM packages (packages which start with sun-mq), you will need to run the mqinstall script.
Please note that the install script will overwrite all Message-Queue-specific RPM packages, and will not install any shared RPM packages. You must install shared RPM packages manually, as described in Step 7.
Run the mqinstall script.
./mqinstall
The script lists the distribution RPM packages including their version numbers, if any, that are already installed, and then lists the RPM packages about to be installed.
If any of the Message Queue RPM packages listed is already installed and its version is newer, then you will probably not want to install the corresponding Message Queue RPM package. In that case, enter n (no) and continue with Step 7.
The mqinstall script does not install the sun-mq-compat RPM package by default and you should only have it installed if you need it. For example, if your existing client applications contain scripts that depend upon former file locations (such as jar files), you will need to install the sun-mq-compat RPM package. To install this RPM package, see Step 7.
Enter y (yes) if you want to install all the Message-Queue-specific RPM packages. Otherwise, enter n (no) and continue with Step 7.
If you run the script, it creates a log file in the following directory:
/var/sadm/install/logs
The /opt/sun/mq directory and its contents are created, and files are placed in other locations as well (see Migration Issues).
If you want to install a subset of the Message QueueRPM packages, if you want to install shared RPM packages, or if you do not want to overwrite later versions of RPM packages, do the following:
Back up the imq3_7-ent-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.
The instance data for any pre-existing broker instance is owned by the user that created that instance. Therefore, once installation is complete, be sure to run any Message Queue broker instance (using the -name instanceName option) as the owner with privileges to the /var/sun/mq/instances/instanceName directory. This applies to the default broker instance (named imqbroker) as well.
Table 3–3 shows the installed directory structure for a full (all RPMs) installation of Message Queue 3.7 UR1 on the Linux platform. (The directory structure may vary if you perform a partial installation.)
File locations for Message Queue bundled with Sun Java System Application Server may differ from those shown in the table.