Monday, January 28, 2013

WebSpher MQ 2 qmgrs in HA mode(Active, Passive)


Hi all today I want to post my article about HA in MQ.
To setup our test environment you need:
1. VirtualBox - virtualbox.org
2. Open Suse ISO - http://software.opensuse.org/122/en
3. FreeNAS iso - http://www.freenas.org/ 
4. Download MQ from IBM: http://www.ibm.com/developerworks/downloads/ws/wmq/



Please download and install VirtualBox and after please create 3 virtual machine how to do this I will skip since it's very easy. Install FreeNAS to first VM and change default hostname to NAS. After installation will be completed:
1. Open in FreeNAS web console and in tab service choose NFS:

2. Enable NFS server:

3. Switch to Share tab and press +:


4. Create network file share you need to change only network:
5. Configuration of FreeNAS completed you can procceed with OpenSuse instillation and configuration.


OpenSuse MQ configuration:

1. Mount NFS share using yast or console(For both Virtual Machine):


2. Create user and group mqm(For both Virtual Machine):
groupadd -g 02091945 mqm
useradd -u 02091945 -g mqm mqm

3. Extract archive with mq to /data/MQ, accept license and install MQ(For both Virtual Machine):
tar -xzf ARCHIVENAME
./mqlicense -accept
rpm -ivh MQ*

4. Create 2 folders on /data/ where will be stored MQ data(For 1 Virtual Machine):
mkdir /data/LOGS
mkdir /data/QMGRS
chown -R mqm:mqm /data/*

5.  Create QMGR (For 1 Virtual Machine):
crtmqm -ld /data/LOGS -md /data/QMGRS -q QMGR1

6. Display qmgr information:
dspmqinf -o command QMGR1

7. Execute output of dspmqinf command on the second MQ server:
addmqinf -s QueueManager -v Name=QMGR1 -v Directory=QMGR1 -v Prefix=/var/mqm -v DataPath=/data/qmgrs/QMGR1

8. Start qmgr on server that you want to use as active:
strmqm -x QMGR1

9. Start qmgr on standby node:
strmqm -x QMGR1

10. Check that they are running in active and standby mode:

11. Reboot 1 node and check second one it's should be in running state. Congratulation configuration completed.

No comments:

Post a Comment