Create the mqweb server

If we installed the IBM MQ for z/OS UNIX System Services Web Components, and want to use the MQ Console, or the REST API, we need to create and customize the mqweb server.


Before starting

We need to create the SYSTEM.REST.REPLY.QUEUE in order to use the Liberty server. Do this by using the latest CSQ4INSG sample in Customize the initialization input data sets.

  • We need to perform this task once for each z/OS system where we want to run the MQ Console or REST API.
  • We need an mqweb server for each version of IBM MQ that is running. For example, if running Version 9.1.0, Version 9.1.5, and Version 9.2.0, we need three different mqweb servers.
  • We might need to refresh or modify the server configuration when migrating from a previous version.

The MQ Console and REST API require the creation of a single Liberty server, called mqweb.

The server configuration and log files are all stored under the Liberty user directory.

The mqweb server needs to be configured with a product ID (PID) that it will run under. This is decided at creation time, and must be the same PID that is to be used to run the local queue managers that the mqweb server connects to. Note: If local queue managers run under multiple different PIDs, choose one of them to run the mqweb server under.

See Product usage recording with IBM MQ for z/OS products for more information on PIDs and how they are used on z/OS.

It is possible to change the PID that the mqweb server runs under, after it is created, using the setmqweb command.

Carry out the following procedure to create the mqweb server:


Procedure

  1. Decide which PID the mqweb server will run under.
  2. Choose a suitable location for the Liberty user directory. The user ID that the mqweb server runs under, needs read and write access to this user directory and its contents. As this user directory will contain log files, as well as the server configuration, we should create this directory in a separate file system. Note: There is a significant amount of disk I/O when the mqweb server starts. To reduce the time taken to start the mqweb server, ensure that both the IBM MQ installation z/OS UNIX file system and the Liberty user directory file system, are either sysplex-aware, or locally mounted on the system where the mqweb server is running.
  3. In UNIX System Services, ensure that your current directory is PathPrefix/web/bin, by issuing the following command:
    cd PathPrefix/web/bin
    PathPrefix is the IBM MQ UNIX System Services Components installation path.
  4. Create the Liberty user directory, containing the template mqweb server definition, by running the crtmqweb script. The format of the crtmqweb command is:
    crtmqweb user_directory -p pid_value 
    where:

      user_directory
      Is the optional Liberty user directory decided in step 2. If this argument is not provided then a default Liberty user directory of /var/mqm/web/installation1 is used.

      pid_value
      Indicates the PID that the mqweb server will run under. This depends on the PID you decided on in step 1.

      If you chose IBM MQ for z/OS (5655-MQ9) then pid_value is MQ.

      If you chose IBM MQ for z/OS Value Unit Edition (VUE) (5655-VU9) then pid_value is VUE.

      If you chose IBM MQ Advanced for z/OS VUE (5655-AV1) then pid_value is ADVANCEDVUE.

      For example, to create the mqweb server with a Liberty user directory of /usr/mqweb and a PID of IBM MQ Advanced for z/OS VUE (5655-AV1) run the following command:
      ./crtmqweb /usr/mqweb -p ADVANCEDVUE

  5. Change the ownership of the directories and files in the Liberty user directory, so that they belong to the user ID and group that the mqweb server runs under, using the command:
    chown -R userid:group path
    To give the group write access to the path, issue the command:
    chmod -R 770 path


What to do next

Create a procedure for the mqweb server Parent topic: Configure the mqweb server