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.
-
Log in as a user in the mqm group.
-
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 the following command:
. MQ_INSTALLATION_PATH/bin/setmqenv -s
where MQ_INSTALLATION_PATH refers to the location where
IBM MQ is installed.
-
Create a queue manager called
QUEUE.MANAGER.1
by entering the following
command:
You see messages telling you that the queue manager has been created.
-
Start the queue manager by entering the following command:
A message tells you when the queue manager has started.
-
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 the following command:
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 the following command:
DEFINE CHANNEL (CHANNEL1) CHLTYPE (SVRCONN) TRPTYPE (TCP)
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.
-
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 on Linux using rpm.
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 the following command:
START LISTENER (LISTENER1)
-
Stop MQSC by entering:
You see some messages, followed by the command prompt.