Verify a local server installation using the command line on AIX
On AIX systems, we can verify a local server installation by using the command line to create a simple configuration of one queue manager and one queue.
Before starting
To verify the installation, we must first install the samples package.Before beginning the verification procedure, you might want to check that we have the latest fixes for the system. For more information about where to find the latest updates, see Check requirements on AIX.
About this task
Use the following steps to configure your default queue manager from the command line. After the queue manager is configured, use the amqsput sample program to put a message on the queue. You then use the amqsget sample program to get the message back from the queue.
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
- On an AIX system, log in as a user in the mqm group.
- Set up the environment:
- Set up environment variables for use with a particular installation by entering one the following command:
. MQ_INSTALLATION_PATH/bin/setmqenv -swhere MQ_INSTALLATION_PATH refers to the location where IBM MQ is installed.- Check that the environment is set up correctly by entering the following command:
dspmqverIf the command completes successfully, and the expected version number and installation name are returned, the environment is set up correctly.
- Create a queue manager called QMA by entering the following command:
crtmqm QMAMessages indicate when the queue manager is created, and when the default IBM MQ objects are created.- Start the queue manager by entering the following command:
strmqm QMAA message indicates when the queue manager starts.- Start MQSC by entering the following command:
runmqsc QMAA message indicates when MQSC starts. MQSC has no command prompt.- Define a local queue called QUEUE1 by entering the following command:
DEFINE QLOCAL (QUEUE1)A message indicates when the queue is created.- Stop MQSC by entering the following command:
endMessages are shown, followed by the command prompt.
Note: Subsequent steps require that the samples package is installed.
- Change into the MQ_INSTALLATION_PATH/samp/bin directory, which contains the sample programs. MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.
- Put a message on the queue by entering the following commands
./amqsput QUEUE1 QMAThe following messages are shown:Sample AMQSPUT0 start target queue is QUEUE1- Type some message text on one or more lines, where each line is a different message. Enter a blank line to end the message input. The following message is shown:
Sample AMQSPUT0 endYour messages are now on the queue and the command prompt is shown.- Get the messages from the queue, by entering the following command:
./amqsget QUEUE1 QMAThe sample program starts, and your messages are displayed.
Results
We have successfully verified your local installation. Parent topic: Verify an IBM MQ installation on AIX