Set up the WebSphere MQ server
Before we can verify the client installation, we need to:
- Create a default queue manager (called queue.manager.1) by entering the following command at the command prompt:
crtmqm -q queue.manager.1The -q option specifies that this queue manager is the default queue manager.
- Start the queue manager by entering the following command:
strmqm- Start MQSC commands by entering the following command:
runmqscMQSC does not provide a prompt, but responds with the message Starting MQSC for queue manager queue.manager.1.- In the MQSC window, create a local queue called QUEUE1 by entering the following command:
define qlocal(QUEUE1)- In the MQSC window, create a server-connection channel by entering the following command:
define channel(channel1) chltype(svrconn) trptype(tcp) mcauser(' ')
- Verification requires you to start the default WebSphere MQ listener on the port number that you specify when setting up the client-connection channel.
By default the listener will listen on port 1414. If you are not going to change the default port when setting up the client workstation, no action is required, proceed to the next step. If you are going to use a different port when setting up the client workstation, alter the definition of the system.default.listener. For example, to use port 2001, enter the command in the MQSC window:
alter listener(system.default.listener.tcp) trptype(tcp) port(2001)To check which ports are free enter the following command:
netstat -anThis will show you a list of running processes. Check the port number of each of the processes to see if the port you plan to use is already in use. The port number is in the Local Address column. The information is given in the form computer_name:port_being _used- In the MQSC window, start the default WebSphere MQ listener by entering the following command:
start listener(system.default.listener.tcp)- In the MQSC window, verify the listener process has started by executing the command:
display lsstatus(*)- Stop MQSC by typing in the MQSC window:
endand then pressing Enter.
The following objects are now defined:
- A default queue manager called queue.manager.1
- A local queue called QUEUE1
- A server-connection channel called CHANNEL1
Parent topic:
Verifying a WebSphere MQ Client