Verifying a deployed IBM MQ software component from an SSH terminal emulator
Verify an IBM® MQ software component locally, without authorizing remote users to the virtuser
user ID. Test the deployment from an SSH terminal emulator.
Before you begin
- Deploy the pattern successfully; see Deploying IBM MQ Virtual System Pattern Type patterns.
- Open an SSH terminal emulator window on the client workstation you are using to connect to a virtual machine in the virtual system instance.
- On UNIX and Linux®, run the ssh command.
- On Windows, obtain an SSH terminal emulator such as PuTTY. The PuTTY website is PuTTY: A Free Telnet/SSH Client. When a connection is established with the deployed virtual machine, the steps in the task are the same.
About this task
Verify the deployment of an IBM MQ software component by running the put and get sample programs on the virtual machine where the IBM MQ software component is deployed.
The user ID virtuser
is not a member of the mqm
group. The example demonstrates the use of the sudo command to make virtuser
a temporary member of the mqm
group for the duration of the command. The example also sets up the minimum set of permissions for virtuser
to run the put and get sample programs, and then removes them. As an alternative, the example also shows running the sudo command to run the put and get sample programs.
Procedure
Results
You demonstrated the queue manager is working correctly.
What to do next
You have completed the verification task. You might choose to remove the changes you made, and try the sudo command to run the put and get sample programs.
- Remove the authorizations you set by running the following commands:
sudo -u mqm setmqaut -m QmgrName -t qmgr -p virtuser -connect sudo -u mqm dspmqaut -m QmgrName -t qmgr -p virtuser sudo -u mqm setmqaut -m QmgrName -n SYSTEM.DEFAULT.LOCAL.QUEUE -t queue -p virtuser -put -get -inq sudo -u mqm dspmqaut -m QmgrName -n SYSTEM.DEFAULT.LOCAL.QUEUE -t queue -p virtuser
- Run the verification again with the sudo command:
- Put a message onto
SYSTEM.DEFAULT.LOCAL.QUEUE
Type a message followed by two new lines.sudo -u mqm /opt/mqm/samp/bin/amqsput SYSTEM.DEFAULT.LOCAL.QUEUE QmgrName
- Get the message from
SYSTEM.DEFAULT.LOCAL.QUEUE
Wait for 15 seconds for the program to finish.sudo -u mqm /opt/mqm/samp/bin/amqsget SYSTEM.DEFAULT.LOCAL.QUEUE QmgrName
- Put a message onto