Follow these instructions to create a queue manager, queue, and channel on the server. You can then use these objects to verify the installation.
About this task
These instructions assume that no queue manager or other IBM® MQ objects have been defined.
IBM MQ object definitions are case-sensitive. Any text entered as an MQSC command in lowercase is converted automatically to uppercase unless you enclose it in single quotation marks. Make sure that you type the examples exactly as shown.
Procedure
-
Create a user ID on the server that is not in the
mqm group.
This user ID must exist on the server and client. This is the user ID that the sample applications must be run as, otherwise a 2035 error is returned.
-
If your server is running on UNIX, Linux® or IBM i, log in as a user in the mqm group.
-
If you are verifying an installation on UNIX,
Linux, or Windows, you must set various environment variables so that the
installation can be used in the current shell. You can set the environment variables by entering one
of the following commands:
-
Create a queue manager called
QUEUE.MANAGER.1 by
entering one of the following commands:
You see messages telling you that the queue
manager has been created.
-
Start the queue manager by entering one of the following
commands:
A message tells you when the queue manager has started.
-
On UNIX, Linux, and Windows, start MQSC by entering the following
command:
A message tells you that an MQSC session has started. MQSC has no command prompt.
-
Define a local queue called
QUEUE1 by entering one of the following
commands:
A message tells you when the queue has been created.
-
Allow the user ID that you created in step 1 to use
QUEUE1 by entering the following command:
SET AUTHREC PROFILE(QUEUE1) OBJTYPE(QUEUE) PRINCIPAL(' non_mqm_user ') AUTHADD(PUT,GET)
where
non_mqm_user is the user ID created in step 1. A message tells you when the authorization has been set. You must also run the following command to give the user ID authority to connect:
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL(' non_mqm_user ') AUTHADD(CONNECT)
If
this command is not run, a 2305 stop error is returned.
-
Define a server-connection channel by entering one of the following commands:
A message tells you when the channel has been created.
-
Allow your client channel to connect to the queue manager and run under the user ID that you created in step 1, by entering the following MQSC command:
SET CHLAUTH(CHANNEL1) TYPE(ADDRESSMAP) ADDRESS(' client_ipaddr ') MCAUSER(' non_mqm_user ')
where
client_ipaddr is the IP address of the client system, and
non_mqm_user is the user ID created in step 1. A message tells you when the rule has been set.
-
On UNIX, Linux, and Windows, define a listener by entering the
following command:
DEFINE LISTENER (LISTENER1) TRPTYPE (TCP) CONTROL (QMGR) PORT (port_number)
where
port_number is the number of the port the listener is to run on. This
number must be the same as the number used when defining your client-connection channel in
Installing an IBM MQ client ; see the appropriate
HP-UX
and
Linux sections for more information.
Note: If
you omit the port parameter from the command, a default value of 1414 is used for
the listener port. If you want to specify a port other than 1414, you must include
the port parameter in the command, as shown.
-
Start the listener by entering one of the following commands:
- On UNIX, Linux, and Windows:
START LISTENER (LISTENER1)
- On IBM i:
STRMQMLSR MQMNAME('QUEUE.MANAGER.1') PORT(1414)
- On z/OS:
START CHINIT
START LSTR TRPTYPE(TCP) PORT(port)
-
On UNIX, Linux, and Windows, stop MQSC by entering the following
command:
You see some messages, followed by the command prompt.