You can use the command line to create and configure IBM® MQ queues.
Before you begin
- Open a command window.
- Navigate to the directory where IBM MQ is installed, such as /opt/mqm/bin.
About this task
Follow these steps to configure IBM MQ from the command line.
Procedure
- Run this command to create a queue manager that is named
MyQueueManager
,
where MyQueueManager
is your designated
queue manager name: crtmqm -c "Data Explorer Queue Manager" -ll -q 'MyQueueManager'
- Run this command to start the queue manager:
- Run this command to open a IBM MQ Script:
- Run this command to define your local queue, where MyQueue is
your designated queue name:
- Run these commands in sequence to disable the channel authentication:
To display the channel authentication status, run:
DISPLAY QMGR CHLAUTH
To disable channel authentication, run:
ALTER QMGR CHLAUTH(DISABLED)
To verify channel authentication, run:
DISPLAY QMGR CHLAUTH
- Run this command to define the channel, where the
MY_CHANNEL
=
the channel name, svrconn
= the channel type, and tcp
=
the transport type. define channel(MY.CHANNEL) chltype(svrconn) trptype(tcp)
- Run this command to define the listener, where the
MY_LISTENER
=
the listener name and is your designated 1416
is
the listening port. DEFINE listener(MY_LISTENER) trptype(tcp) port(1416)
- Run this command to start the listener
start listener(MY_LISTENER)
Results
Verify that the message started by MY_LISTENER
is
received.