IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Create a multi-instance queue manager on Linux

An example shows how to set up a multi-instance queue manager on Linux. The setup is small to illustrate the concepts involved. The example is based on Linux Red Hat Enterprise 5. The steps differ on other UNIX platforms.

The example is set up on a 2 GHz notebook computer with 3 GB RAM running Windows. Two VMware virtual machines run Linux Red Hat Enterprise 5 in 640 MB images. A WebSphere® MQ client is installed on an additional 400 MB VMware image that runs Windows and runs the sample high availability applications. All the virtual machines are configured as part of a VMware host-only network for security reasons. Although it is generally recommended not to use an automatically generated IP address, it is acceptable to use one for a short demonstration, because the IP address is unlikely to change.

Example

Table 1. Illustrative multi-instance queue manager configuration on Linux
Server 1 Server 2
Log in as root
Follow the instructions in WebSphere MQ Quick Beginnings for Linux to install WebSphere MQ, create the mqm user and group, and define /var/mqm.
Carry out the task, Verifying shared file system locking to check the file system supports multi-instance queue managers.
Check what uid and gid /etc/passwd displays for mqm, for example,

mqm:x:501:100:MQ User:/var/mqm:/bin/bash

Match the uid and gid for mqm in /etc/passwd and reboot if you have had to change the values.
Create log and data directories in a common folder, /MQHA, that is to be shared. For example,
  1. mkdir /MQHA
  2. mkdir /MQHA/logs
  3. mkdir /MQHA/qmgrs
Create the folder, /MQHA, to mount the shared file system. Keep the path the same as on server 1; for example:
  1. mkdir /MQHA
Ensure that the MQHA directories are owned by user and group mqm, and the access permissions are set to rwx for user and group; for example ls -al displays,

drwxrwxr–x mqm mqm 4096 Nov 27 14:38 MQDATA

  1. chown -R mqm:mqm /MQHA
  2. chmod -R ug+rwx /MQHA
Create the queue manager:

crtmqm -ld /MQHA/logs -md /MQHA/qmgrs -q QM1

 
Add1 /MQHA *(rw,sync,no_wdelay,fsid=0) to /etc/exports  
Start the NFS daemon: /etc/init.d/nfs start  
Discover the host name or IP address of server 1: ifconfig2 Mount the exported file system /MQHA:

mount -hard -intr -t nfs4 192.168.217.130:/ /MQHA

Copy the queue manager configuration details from Server 1,
dspmqinf -o command QM1
and copy the result to the clip board,
addmqinf -s QueueManager
 -v Name=QM1
 -v Directory=QM1
 -v Prefix=/var/mqm
 -v DataPath=/MQHA/qmgrs/QM1
Paste the queue manager configuration command into Server 2,
addmqinf -s QueueManager 
-v Name=QM1 
-v Directory=QM1 
-v Prefix=/var/mqm 
-v DataPath=/MQHA/qmgrs/QM1
Start the queue manager instances, in either order, with the -x parameter: strmqm -x QM1
1 The '*' allows all machines that can reach this one mount /MQHA for read/write. Restrict access on a production machine.
2 Try the command /sbin/ifconfig if the simple ifconfig command does not work.

fa70160_.htm | Last updated Friday, 21 July 2017