Sie sind auf Seite 1von 18

WebSphere MQ Installation and integrating with WebSphere Application server

 Extract the MQ Software MQ_7.5_TRIAL_FOR_LNX_ON_X86_64_ML.tar.gz into a directory


 Create group mqm and user mqm.
 Add mqm user to mqm group

[root@centos ~]# groupadd -g 600 mqm


[root@centos ~]# useradd -u 601 -d /home/mqm -g mqm -m -s /bin/bash mqm

 Go to MQ extracted directory and execute mqlicense.sh -accept

[root@centos mq]# ./mqlicense.sh -accept


Licensed Materials - Property of IBM
5724-H72
(C) Copyright IBM Corporation 1994, 2012 All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
Agreement accepted: Proceed with install.

[root@centos mq]#

 It is Better to install all products/services, so execute rpm –ivh MQSeries*rpm. It will install
all MQ Packages.

[root@centos mq]# rpm -ivh MQSeries*rpm


Preparing... ########################################### [100%]
1:MQSeriesRuntime ########################################### [ 3%]
2:MQSeriesJRE ########################################### [ 6%]
3:MQSeriesJava ########################################### [ 10%]
4:MQSeriesFTBase ########################################### [ 13%]
5:MQSeriesServer ########################################### [ 16%]
6:MQSeriesFTAgent ########################################### [ 19%]
7:MQSeriesFTService ########################################### [ 23%]
8:MQSeriesAMS ########################################### [ 26%]
9:MQSeriesFTLogger ########################################### [ 29%]
10:MQSeriesXRService ########################################### [ 32%]
11:MQSeriesFTTools ########################################### [ 35%]
12:MQSeriesExplorer ########################################### [ 39%]
13:MQSeriesGSKit ########################################### [ 42%]
14:MQSeriesClient ########################################### [ 45%]
15:MQSeriesMan ########################################### [ 48%]
16:MQSeriesMsg_cs ########################################### [ 52%]
17:MQSeriesMsg_de ########################################### [ 55%]
18:MQSeriesMsg_es ########################################### [ 58%]
19:MQSeriesMsg_fr ########################################### [ 61%]
20:MQSeriesMsg_hu ########################################### [ 65%]
21:MQSeriesMsg_it ########################################### [ 68%]
22:MQSeriesMsg_ja ########################################### [ 71%]
23:MQSeriesMsg_ko ########################################### [ 74%]
24:MQSeriesMsg_pl ########################################### [ 77%]
25:MQSeriesMsg_pt ########################################### [ 81%]
26:MQSeriesMsg_ru ########################################### [ 84%]
27:MQSeriesMsg_Zh_CN ########################################### [ 87%]
28:MQSeriesMsg_Zh_TW ########################################### [ 90%]
29:MQSeriesSamples ########################################### [ 94%]
30:MQSeriesSDK ########################################### [ 97%]
31:MQSeriesXRClients ########################################### [100%]
[root@centos mq]#

 Add MQ path in environment variables by editing .bash_profile for mqm and root users
 Go to /home/mqm and do vim .bash_profile.

[root@centos mq]# cd /home/mqm/


[root@centos mqm]# vim .bash_profile

 Append /opt/mqm/bin

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/opt/mqm/bin
export PATH

 Switch to mqm user and check the mq version by executing dspmqver.sh

[root@centos ~]# su mqm

[mqm@centos root]$ dspmqver

Name: WebSphere MQ

Version: 7.5.0.1

Level: p750-001-130308.1

BuildType: IKAP - (Production)

Platform: WebSphere MQ for Linux (x86-64 platform)


Mode: 64-bit

O/S: Linux 2.6.32-431.el6.x86_64

InstName: Installation1

InstDesc:

InstPath: /opt/mqm

DataPath: /var/mqm

Primary: No

MaxCmdLevel: 750

[mqm@centos root]$

 Create a test queue manager, queue and put a message and get message.
 Now Integreate MQ with Websphere Application Server
 Create a Queue manager, Queue, Listener, Channel
 We have to add WAS running User to mqm Group and need to provide access to the
resources, In this machine was is owned by root. So root is adding to mqm.

[root@centos ~]# usermod -a -G mqm root

[root@centos ~]# su mqm

[mqm@centos root]$ setmqaut -m WAS -t qmgr -g mqm +all


The setmqaut command completed successfully.

[mqm@centos root]$

 That’s it from MQ Side. Now Go to Admin console and create Queue connection factory/s, ques.

1) Log in to Admin console, go to Resources expand JMS=> click Queue Connection Factories
2) Click new to create new connection factory (Select Scope as per requirement) and click New
3) Here two options will come Default messaging provider and WebSphere MQ messaging
provider.
4) Select WebSphere MQ messaging provider ad click OK.

5) Enter Qcf name MQCF and JNDI as jms/MQCF and click Next ( All These values will give by
Application Teams)
6) In next section we will see two types of connections methods, Select first one “Enter all the
required information into this wizard” and click next.

7)

8) Enter Queue Manager created earlier ” WAS” and click Next


9) In next screen enter Hostname, Port and Channel Name. an click Next

10) Click Test Connection Button. Connection will be succesfull.


11) Click next to go to summary. And click finish
12) Save and synchronize. Now we have QCF

***** Now we need to create Queue Destinations in admin console.

1) Navigate to Queues from Adminconsole->Resources-> JMS


1) Select Cluster Scope, Click on New
2) Select WebSphere MQ JMS provider, and click OK

3) In the next Screen Enter Queue Name and jndi (Queuename may be anything) , Original Queue
Name created in MQ, and Queue Manager created in MQ.
4) Save and syncrinize.
5) Deploying a simple JMS application, This application is simple servlet to put message in queue
and get the messages from the same Queue.
6) In the admin console select install applications

7) Choose Detailed Install Path.


8) In Step Step 6: Bind message destination references to administered objects Enter the Created JNDI
of Queue jms/TestQ
9) In Step 7 Step 7: Map resource references to resourcesEnter QCF JNDI jms/MQCF
10) Select Virtual host.

11) Use default URI.


12) Finally save and Synchronize.

Das könnte Ihnen auch gefallen