Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Installation and configuration of

WebSphere MQ on Windows and UNIX

© Copyright IBM Corporation 2008


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1.0.1
4.1.01
Unit objectives
After
After completing
completingthisthisunit,
unit,you
youshould
shouldbe beable
ableto:
to:
•• Identify
Identifythe
thesteps
stepsrequired
requiredto toinstall
installWebSphere
WebSphereMQ MQ onon
Windows, AIX, or Solaris
Windows, AIX, or Solaris
•• Find
Findthe
thehardware
hardwareand andsoftware
softwareprerequisites
prerequisitesforfor WebSphere
WebSphere
MQ
MQ installation
installation
•• Use
UseWebSphere
WebSphereMQ MQ utilities
utilitiestotocreate,
create,start,
start,and
andstop
stopaa
queue
queuemanager
manager
•• Configure
Configurebasic
basicWebSphere
WebSphereMQ MQ objects
objects
•• Name
Nameseveral
severalWebSphere
WebSphereMQ MQ utilities
utilitiesthat
thatcan
canbebeused
usedto
to
test
testaaWebSphere
WebSphereMQ MQ environment
environment

© Copyright IBM Corporation 2008


Plan an WebSphere MQ implementation topic objectives

After completing this topic, you should be able to:


• Understand the importance of naming conventions for a
successful implementation
• Identify the different queue types and channels so that they
can be considered for the implementation
• List the command modes for entering WebSphere MQ
commands and know where to find them documented

© Copyright IBM Corporation 2008


Naming WebSphere MQ objects
• Allowable character set
A-Z, a-z, 0-9, and . / _ %
• Maximum of 48 characters for the names of:
– Queue managers
– Queues
– Process definitions
– Namelists
– Clusters
– Listeners
– Services
– Authentication information objects
• Maximum of 20 characters for the names of channels
• No implied structure in a name

Note: Names in WebSphere MQ are case-sensitive

© Copyright IBM Corporation 2008


Queue manager
• May have multiple queue managers per system
• Naming conventions
– Typically short
• TCP/IP host name
• Windows system name
• SNA LU alias
• Node name
– Should be unique within the network

© Copyright IBM Corporation 2008


Queues
• Only a local queue stores messages
• Other queue types
– Alias queue
– Local definition of a remote queue
– Model queue (a template, from which dynamic queues are derived)
and dynamic queue
• Queue type is transparent to the application
– Model and dynamic queues are the exception
• Useful naming conventions
– Name of a queue should describe its function, not its type or location
– Common prefix for names of related queues simplifies administration

© Copyright IBM Corporation 2008


Special local queues
• Dead letter queue
– One per queue manager
– Designated queue for messages that cannot be delivered
– Always set up a dead letter queue
• Initiation queues
– Used for triggering
• Transmission queues
• Command queue
• Event queues
• Default queues

© Copyright IBM Corporation 2008


Message channel

MQPUT
MQGET

Sending Receiving
MCA MCA
Transmission queue TCP/IP, SNA
Application queue

QM1 QM2

© Copyright IBM Corporation 2008


Administration interfaces
Customer/vendor
administration application
(PCF commands / MQAI)
WebSphere runmqsc
MQ Explorer (script commands)

Indirect Indirect
mode mode

Direct Direct
mode Control
mode
(local Command commands
(local
system queue system
only) only)

Command
server

Queue manager
Instrumentation events Event
queues
Queues Processes Namelists Channels

© Copyright IBM Corporation 2008


Plan an WebSphere MQ implementation topic summary

Having completed this topic, you should be able to:


• Define the importance of naming conventions for a successful
implementation
• Identify the different queue types and channels so that they
can be considered for the implementation
• List the command modes for entering WebSphere MQ
commands and know where to find them documented

© Copyright IBM Corporation 2008


Installation procedures topic objectives
After completing this topic, you should be able to:
• Outline the considerations for migration from an earlier
WebSphere MQ release
• Install IBM WebSphere for MQ on a Windows platform
• Identify how to recognize prerequisite software requirements
• List supported server and client platforms

© Copyright IBM Corporation 2008


Before the installation
• Decide on your install path
– New installation with no previous WebSphere MQ version on the
computer
– Upgrade from WebSphere MQ V5.3 or V6 to V7

• Prepare the environment

• Have a backup and fallback plan

• Consider application migration issues

• Have a migration plan and strategy

• Perform the installation

© Copyright IBM Corporation 2008


WebSphere MQ installation
Similar to installing other software on the same platform
• AIX • SINIX and DC/OSx
– SMIT – pkgadd (DC/OSx)
– Also an easy installation – sysadm (SINIX)
• NCR UNIX • SunOS
– sysadm or pkgadd – Run the supplied installation script from the
• Compaq OpenVMS CD-ROM
– VMSINSTAL • Sun Solaris
• HP-UX – pkgadd
– swinstall • HP NonStop Server
• Linux – RESTORE, then run the supplied installation
– Red Hat Package Manager utility, instmqm
• Windows
– Automatic execution of setup from CD-ROM

© Copyright IBM Corporation 2008


Eclipse V3.3 prerequisite
• Required for WebSphere MQ Explorer V7
– Must install Eclipse V3.3 before installing WebSphere MQ if using
Explorer
– WebSphere MQ Explorer V6 used Eclipse V3.2

• Install the executable file located in the CD or install image


<Prereqs>/IES/Setup.exe

• WebSphere MQ Explorer will be installed as plug-ins on top of


Eclipse V3.3 during WebSphere MQ installation

• For Windows Vista and UAC enabled


– Accept the Windows prompt to allow launchpad in elevated state

© Copyright IBM Corporation 2008


Installing WebSphere MQ (1 of 6)

© Copyright IBM Corporation 2008


Installing WebSphere MQ (2 of 6)

© Copyright IBM Corporation 2008


Installing WebSphere MQ (3 of 6)

© Copyright IBM Corporation 2008


Installing WebSphere MQ (4 of 6)

© Copyright IBM Corporation 2008


Installing WebSphere MQ (5 of 6)

Valid only when migrating from V5.3

© Copyright IBM Corporation 2008


Installing WebSphere MQ (6 of 6)

© Copyright IBM Corporation 2008


Silent install - Unattended installation
• You can invoke MSI directly for silent install

• There are several methods:


– Using the msiexec command with command line parameters
• msiexec parameters USEINI="response-file"
TRANSFORM="transform_file"
– Using the msiexec command with a response file
– Using the MQParms command with command line parameters, a
parameter file, or both

© Copyright IBM Corporation 2008


Uninstalling WebSphere MQ
• Uninstall WebSphere MQ Explorer before uninstalling
WebSphere MQ

• Ensure that there are no WebSphere MQ programs or


processes running

• If running WebSphere MQ with Microsoft Cluster Service


(MSCS), remove queue managers from the MSCS control
before uninstalling WebSphere MQ

• Methods for uninstalling WebSphere MQ:


– Start the installation process, then select the appropriate option
– Use the Add or Remove Programs facility in the Windows control
panel
– Perform a removal from the command line using msiexec Windows
command using the WebSphere MQ.msi in the installation image
For example:
msiexec /i "path\MSI\WebSphere MQ.msi” REMOVE="All"
© Copyright IBM Corporation 2008
Supported server and client platforms (1 of 2)

Platforms Server Client

Windows XP Professional 32/64 bit


Windows 2003 Standard/Enterprise 32/64 bit
; ;
Windows Vista Business/Enterprise/Ultimate 32/64 bit
(New in V7 is the support for 64-bit platforms)

z/OS V1.8 or later ;

Linux (x86)
•Red Hat Enterprise Linux (RHEL) V4.0 or later update
•SuSE Linux Enterprise Server (SLES) V9 or V10 ; ; With
•NLPOS9 FP1 server
•IRES V2
•Red Flag Data Centre V5.0

Linux (on x86-64 or on POWER)


; With
•Red Hat Enterprise Linux V4.0 or later ; server
•SUSE Linux Enterprise Server (SLES) V9 or V10

© Copyright IBM Corporation 2008


Supported server and client platforms (2 of 2)

Platforms Server Client

z/Linux
• zSeries platform (not supported in this release) ; ; With server
• zSeries s390x platform

AIX V 5.3 or later ; ; With server

Sun Solaris V9 and V10 (SPARC or x86-64) ; ; With server

HP-UX 11i v2 or higher on PA-RISC or Itanium ; ; With server

iSeries i5/OS V5.3.0 or later levels ; ; With server

Refer to the Information Center for most current and detailed information on supported platforms

© Copyright IBM Corporation 2008


IBM WebSphere for MQ Quick Beginnings books
PDF file name Order No. Title

AMQAAC07 GC34-6478 Quick Beginnings for AIX

AMQCAC06 GC34-6479 Quick Beginnings for HP-UX

AMQWAC03 GC34-6481 Quick Beginnings for i5/OS

AMQ1AC04 GC34-6480 Quick Beginnings for Linux

AMQDAC07 GC34-6477 Quick Beginnings for Solaris

AMQTAC05 GC34-6476 Quick Beginnings for Windows

© Copyright IBM Corporation 2008


Installation procedures topic summary
Having completed this topic, you should be able to:
• Outline the considerations for migration from an earlier
WebSphere MQ release
• Install IBM WebSphere for MQ on a Windows platform
• Identify how to recognize prerequisite software requirements
• List supported server and client platforms

© Copyright IBM Corporation 2008


Creating, starting, stopping a queue manager topic
objectives

After completing this topic, you should be able to:


• List the commands required to create, start or stop a queue
manager
• Use basic commands to define objects
• Use MQSC command scripts for definitions and configuration
of MQ objects

© Copyright IBM Corporation 2008


Creating and deleting queue managers

crtmqm –q QManagerName

• You need authority to use a control command


• QManagerName is a required parameter
• -q specifies the default queue manager

dltmqm QManagerName

© Copyright IBM Corporation 2008


Starting a queue manager

strmqm QManagerName

runmqsc QManagerName

© Copyright IBM Corporation 2008


WebSphere MQ MQSC command scripts
• Each command starts on new line
• Commands and keywords are not case-sensitive
• Blank line and line starting with asterisk (*) are ignored
• Restrict maximum line length to 72 characters for portability
• Last non-blank character determines continuation
– Minus sign (-) continues command from start of next line
– Plus sign (+) continues command from first non-blank character in the
next line
DEFINE QLOCAL(MY_DEAD_LETTER_Q) +
REPLACE

Example: ALTER QMGR DEADQ(MY_DEAD_LETTER_Q)

DEF QL(ANOTHER) REPLACE +


DESCR('This is a test queue')

* This is a comment
© Copyright IBM Corporation 2008
Run WebSphere MQ commands

runmqsc QManagerName

• Standard input device -> runmqsc -> standard output device


• Optional parameters
-e Do not copy source text to output report
-v Perform syntax check only

runmqsc -e QManagerName
runmqsc QManagerName < mqsc.in > mqsc.out

© Copyright IBM Corporation 2008


Creating a local queue

DEFINE QLOCAL(MY_QUEUE) REPLACE +


DESCR('This is a test queue') +
PUT(ENABLED) GET(ENABLED) +
DEFPSIST(YES) SHARE +
MAXDEPTH(1000) MAXMSGL(2000) +
NPMCLASS(HIGH)

DEF QL(XXX) LIKE(MY_QUEUE)

DEF QL(QName)

© Copyright IBM Corporation 2008


Displaying attributes

• Display all the attributes of a queue


DISPLAY QLOCAL(XXX)

• Display selected attributes of a queue


DISPLAY QUEUE(XXX) DESCR GET PUT
DISPLAY QUEUE(YYY) MAXDEPTH CURDEPTH

• Generic queue names are allowed


DIS Q(SYSTEM*)

• Display all attributes of the queue manager object


DISPLAY QMGR

© Copyright IBM Corporation 2008


Defining other queue types
• Alias queue
DEFINE QALIAS(AAA)TARGQ(XXX)

• Local definition of a remote queue (remote queue definition)


DEFINE QREMOTE(BBB) +
RNAME(YYY) RQMNAME(QM2)

• Model queue
– TEMPDYN, dynamic queue deleted when closed
– PERMDYN, dynamic queue can hold persistent messages

DEFINE QMODEL(ANSQ) DEFTYPE(TEMPDYN)

© Copyright IBM Corporation 2008


More WebSphere MQ commands
• Alter selected attributes
ALTER QLOCAL(XXX) PUT(DISABLED)
ALTER QALIAS(AAA) TARGQ(YYY)
ALTER QMGR DESCR('New description')

• The following are only valid if the queue is not in use


– Delete a queue
DELETE QLOCAL(XXX)
DELETE QREMOTE(BBB)

– Delete all messages on a local queue


CLEAR QLOCAL(XXX)

© Copyright IBM Corporation 2008


End queue manager
• Controlled (or quiesced) endmqm -c QManagerName
– Allows connected applications
to end, but no new ones

• Controlled (wait) endmqm -w QManagerName


– Same as –c option, except that
endmqm reports queue manager shutdown status periodically

• Immediate
– Completes all current MQI calls, endmqm -i QManagerName
but no new ones

• Preemptive endmqm -p QManagerName


– Stops without waiting for
applications to disconnect or for MQI calls to complete

© Copyright IBM Corporation 2008


Creating, starting, stopping a queue manager topic
summary

After completing this topic, you should be able to:


• List the commands required to create, start or stop a queue
manager
• Use basic commands to define objects
• Use MQSC command scripts for definitions and configuration
of MQ objects

© Copyright IBM Corporation 2008


Sample programs topic objectives
After completing this topic, you should be able to:
• List the supplied sample programs and how to use them

© Copyright IBM Corporation 2008


Sample programs
• What is available?
– C and COBOL source
– C executables

• Read from the standard input device and put messages


amqsput QName [QManagerName]
• Get messages and write to the standard output device
amqsget QName [QManagerName]
• Browse messages showing both application data and message
descriptor
amqsbcg QName [QManagerName]
• Browse messages showing application data only
amqsgbr QName [QManagerName]

© Copyright IBM Corporation 2008


Checkpoint questions (1 of 2)
1. True or false: Queue manager names can be made up of any
printable ASCII characters.

2. Alias queues can point to what other queue types?


a. Another alias queue
b. Local queues
c. Model queues

3. Any local queue can be a dead letter queue if it:


a. Is identified as the dead letter queue to the queue manager.
b. Has put enabled.
c. Is not being used by any other application.

4. True or false: Altering queue attributes can be done while the


queue manager is running and the changes take effect
immediately.
© Copyright IBM Corporation 2008
Checkpoint questions (2 of 2)
5. For which of these queue types is the NPMCLASS attribute valid?
a. Local
b. Remote
c. Model
d. Alias
e. Cluster queue
6. What does the command CRTMQM -q -u DLQ CHIWINSVR create?
a. A queue manager named DLQ
b. A default queue manager named CHIWINSVR with queue DLQ assigned to the
queue manager as the dead letter queue.
c. A queue manager named CHIWINSVR
d. A queue manager named CHIWINSVR with a default transmission queue DLQ
assigned to the queue manager
7. The command endmqm -c DALHOST was issued. What type of
shutdown is performed?
a. Normal
b. Preemptive
c. Controlled
d. Immediate

© Copyright IBM Corporation 2008


Checkpoint solutions (1 of 2)
1. True or false: Queue manager names can be made up of any
printable ASCII characters.
– False

2. Alias queues can point to what other queue types?


a. Another alias queue
b. Local queues
c. Model queues

3. Any local queue can be a dead letter queue if it:


a. Is identified as the dead letter queue to the queue manager.
b. Has put enabled.
c. Is not being used by any other application.

4. True or false: Altering queue attributes can be done while the


queue manager is running and the changes take effect
immediately.
– True
© Copyright IBM Corporation 2008
Checkpoint solutions (2 of 2)
5. For which of these queue types is the NPMCLASS attribute valid?
a. Local
b. Remote
c. Model
d. Alias
e. Cluster queue
6. What does the command CRTMQM -q -u DLQ CHIWINSVR create?
a. A queue manager named DLQ
b. A default queue manager named CHIWINSVR with queue DLQ assigned to
the queue manager as the dead letter queue.
c. A queue manager named CHIWINSVR
d. A queue manager named CHIWINSVR with a default transmission queue DLQ
assigned to the queue manager
7. The command endmqm -c DALHOST was issued. What type of
shutdown is performed?
a. Normal
b. Preemptive
c. Controlled
d. Immediate

© Copyright IBM Corporation 2008


Unit summary
Having
Havingcompleted
completedthisthisunit,
unit, you
youshould
shouldbe beable
ableto:
to:
•• Identify
Identifythe
thesteps
stepsrequired
requiredto toinstall
installWebSphere
WebSphereMQ MQ onon
Windows, AIX, or Solaris
Windows, AIX, or Solaris
•• Find
Findthe
thehardware
hardwareand andsoftware
softwareprerequisites
prerequisitesfor for WebSphere
WebSphere
MQ
MQ installation
installation
•• Use
UseWebSphere
WebSphereMQ MQ utilities
utilitiestotocreate,
create,start,
start,and
andstop
stopaa
queue
queuemanager
manager
•• Configure
Configurebasic
basicWebSphere
WebSphereMQ MQ objects
objects
•• Name
Nameseveral
severalWebSphere
WebSphereMQ MQ utilities
utilitiesthat
thatcan
canbebeused
usedto
to
test
testaaWebSphere
WebSphereMQ MQ environment
environment

© Copyright IBM Corporation 2008

You might also like