After You install WebSphere MQ, first thing you need to do is creating a queue manager. A queue manager is a kind of container of all the objects in MQ. Here is the simple command to create it:
$ crtmqm -lc -ld /var/mqm/logs -md /var/mqm -q qmgr1
WebSphere MQ queue manager created.
Directory ‘/var/mqm/qmgr1’ created.
The queue manager is associated with installation ‘Installation1’.
Creating or replacing default objects for queue manager ‘qmgr1’.
Default objects statistics : 79 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.
You can get all the options for the command by typing:
crtmqm –help
AMQ7027: Argument –help supplied to command crtmqm is invalid.
Usage: crtmqm [-z] [-q] [-c Text] [-d DefXmitQ] [-h MaxHandles]
[-md DataPath] [-g ApplicationGroup] [-oa user|group]
[-t TrigInt] [-u DeadQ] [-x MaxUMsgs] [-lp LogPri] [-ls LogSec]
[-lc | -ll] [-lf LogFileSize] [-ld LogPath] QMgrName
-c Descriptive text.
-d Default transmission queue name.
-g Restrict use of the queue manager to this group.
-h Maximum number of handles per connection handle.
-lc Use circular logging.
-ld Directory used to hold the log files for the queue manager.
-lf Log file size, specified in units of 4 KB pages.
-ll Use linear logging.
-lp Primary log files allocated when the queue manager is created.
-ls Secondary log files allocated when the primary files are exhausted.
-md Directory used to hold the data files for the queue manager.
-oa Authorization policy for the queue manager.
-q Make this queue manager the default queue manager.
-t Trigger interval in milliseconds.
-u Dead-letter queue name.
-x Maximum number of uncommitted messages under any one syncpoint.
-z Suppress error messages.
$dspmq
QMNAME(sl73accpapd001_qmgr) STATUS(Ended immediately)
$ strmqm qmgr1
The system resource RLIMIT_NOFILE is set at an unusually low level for
WebSphere MQ.
The system resource RLIMIT_NPROC is set at an unusually low level for WebSphere
MQ.
WebSphere MQ queue manager ‘qmgr1’ starting.
The queue manager is associated with installation ‘Installation1’.
5 log records accessed on queue manager ‘qmgr1’ during the log replay phase.
Log replay for queue manager ‘qmgr1’ complete.
Transaction manager state recovered for queue manager ‘qmgr1’.
WebSphere MQ queue manager ‘qmgr1’ started using V8.0.0.0.
$ runmqsc qmgr1
5724-H72 (C) Copyright IBM Corp. 1994, 2014.
Starting MQSC for queue manager qmgr1.
DIS LISTENER(SYSTEM.DEFAULT.LISTENER.TCP)
4 : DIS LISTENER(SYSTEM.DEFAULT.LISTENER.TCP)
AMQ8630: Display listener information details.
LISTENER(SYSTEM.DEFAULT.LISTENER.TCP) CONTROL(MANUAL)
TRPTYPE(TCP) PORT(0)
IPADDR( ) BACKLOG(0)
DESCR( ) ALTDATE(2018-05-06)
ALTTIME(07.37.10)
ALTER LISTENER(SYSTEM.DEFAULT.LISTENER.TCP) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)
11 : ALTER LISTENER(SYSTEM.DEFAULT.LISTENER.TCP) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)
AMQ8623: WebSphere MQ listener changed.
Note that the Control and Port defines that the listener will be controlled by the queue manager and the port it will listen to is 1414.
Now you can restart the queue manager and see that the Listener is up and running
$ endmqm qmgr1
Quiesce request accepted. The queue manager will stop when all outstanding work
is complete.
$ dspmq
QMNAME(qmgr1) STATUS(Ended normally)
$ strmqm qmgr1
The system resource RLIMIT_NOFILE is set at an unusually low level for
WebSphere MQ.
The system resource RLIMIT_NPROC is set at an unusually low level for WebSphere
MQ.
WebSphere MQ queue manager ‘qmgr1’ starting.
The queue manager is associated with installation ‘Installation1’.
5 log records accessed on queue manager ‘qmgr1’ during the log replay phase.
Log replay for queue manager ‘qmgr1’ complete.
Transaction manager state recovered for queue manager ‘qmgr1’.
WebSphere MQ queue manager ‘qmgr1’ started using V8.0.0.0.
$ netstat -an|grep 1414
tcp 0 0 0.0.0.0:1414 0.0.0.0:* LISTEN