Linux: Applying maintenance level updates on IBM MQ

How to apply maintenance level updates to IBM® MQ for Linux® using RPM. The following procedure applies to all Linux platforms, including Ubuntu.

Before you begin

If you are running on a server with multiple IBM MQ installations, you must identify the installation. Make sure that the commands you enter run against the correct installation; see setmqenv.

About this task

Maintenance level updates are delivered in the form of Red Hat Package Manager (RPM) update images, which are applied using the RPM installation tool.

You can apply and remove maintenance from a IBM MQ MQI client that is not installed on the same server as a queue manager. You do not have to stop any queue managers or logon as administrator. Because you do not have to stop any queue managers, do not do steps 1 to 3 in the following maintenance procedure.

Important: pax and rpmbuild are not supplied as part of the product. You must obtain these from your Linux distribution supplier.

Additional disk space is required for the update images to allow maintenance level updates to be removed and the previous level restored. The updated files are kept in MQ_INSTALLATION_PATH/maintenance directory. Do not delete or move this directory or the files it contains.

MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.

Updates are cumulative. You can apply your chosen update directly, without applying any previous updates first. The maintenance level updates might contain updates for one or more packages. You must apply those parts of an update that correspond to the packages that are applied in your installation.
Important: Although it is possible to install a fix pack at the same level as an installation performed from a manufacturing refresh image at that level, you should not attempt this process. Installing a fix pack at the same level as the one already on your system, can leave the package management database of your system in an inconsistent state with respect to the installation of IBM MQ.

Procedure

  1. Log in as a user in group mqm.
  2. Stop all applications using the IBM MQ installation.

    If you use the MQ Managed File Transfer (MFT) component, ensure that any MFT agents have finished all of the file transfers that they were engaged in. There should be no incomplete transfers associated with the agents, and their SYSTEM.FTE.STATE queues should contain no messages.

  3. End all the activity of queue managers associated with the IBM MQ installation.
    1. Run the dspmq command to list the state of all the queue managers on the system.

      Run either of the following commands from the installation that you are updating:

      
      dspmq -o installation -o status
      dspmq -a
      

      dspmq -o installation -o status displays the installation name and status of queue managers associated with all installations of IBM MQ.

      dspmq -a displays the status of active queue managers associated with the installation from which the command is run.

    2. Run the MQSC command, DISPLAY LSSTATUS(*) STATUS to list the status of listeners associated with a queue manager.
      
      echo "DISPLAY LSSTATUS(*) STATUS" | runmqsc QmgrName
      
    3. Run the endmqm command to stop each running queue manager associated with this installation.
      Read syntax diagramSkip visual syntax diagramendmqm -c-w-i-p QmgrName

      The endmqm command informs an application that the queue manager it is connected to is stopping; see Stopping a queue manager.

      • For the maintenance to proceed, applications must respond to an endmqm command by disconnecting from the queue manager and releasing any IBM MQ libraries they have loaded. If they do not, you must find another way to force applications to release IBM MQ resources, such as by stopping the applications.
      • You must also stop applications that are using the client libraries that are part of the installation. Client applications might be connected to a different queue manager, running a different installation of IBM MQ. The application is not informed about queue managers in the current installation being shut down.
      • Any applications that continue to have IBM MQ shared libraries from the installation loaded prevent you applying IBM MQ maintenance. An application might disconnect from a queue manager, or be forcibly disconnected, but keep an IBM MQ shared library loaded.
      Note: The topic, Applying maintenance level updates to multi-instance queue managers, describes how to apply maintenance to a multi-instance queue manager. A multi-instance queue manager can continue to run on one server, while maintenance is applied to another server.
    4. Stop any listeners associated with the queue managers, using the command:
      
      endmqlsr -m QMgrName
      
  4. Log in as root, or switch to the superuser using the su command.
  5. Change into the directory containing the maintenance packages.
  6. Run the ls command to list the available updates.

    For example, if there are level 1 maintenance updates for the Runtime, SDK and Server packages, you see the following:

    
    MQSeriesRuntime-Uxxxx-V.R.0-1.i386.rpm
    MQSeriesSDK-Uxxxx-V.R.0-1.i386.rpm
    MQSeriesServer-Uxxxx-V.R.0-1.i386.rpm
    
    where V is the version number and R is the number of the Release.
  7. Run the rpm command to find out which packages are installed on your server.

    Enter the following command:

    
    rpm -qa | grep MQSeries
    
    Notes:
    1. If you are using Ubuntu, add the --force-debian attribute.
      
      rpm --force-debian -qa | grep MQSeries
      
    2. If you are using Linux on POWER® Systems - Little Endian , add the --ignorearch attribute.

      You must include this option to prevent problems with some levels of rpm not recognizing the Linux on POWER Systems - Little Endian architecture.

    For example, if you have a minimum IBM MQ installation and SDK component, at level 0, the rpm command returns:
    
    MQSeriesRuntime-V.R.0-0
    MQSeriesSDK-V.R.0-0
    MQSeriesServer-V.R.0-0
    
    where V is the version number and R is the number of the Release.
  8. If this fix pack is to be upgraded on an installation, other than the first installation on the system, run the crtmqfp command to create and use a unique set of packages to install on the system.
    Note, that if this is the first, or only, IBM MQ installation on the system, you can ignore this step.
    You must install the pax command in order for the crtmqfp command to run on Linux.
    1. Run the command ./crtmqfp <suffixname> where suffixname is the same as the suffix used during renaming of the base level IBM MQ installation.
    2. Set your current directory to the location specified when the crtmqfp command completes.
      This directory is a subdirectory of /var/tmp/mq_rpms, in which the unique set of packages is created. The packages have the suffix value contained within the filename.

      For example, if you used suffix 1 during repackaging of the base level IBM MQ installation, enter the command: ./crtmqfp 1.

      There is now a subdirectory named /var/tmp/mq_rpms/1/xxxx, and the packages will be renamed, for example, from MQSeriesRuntime-V.R.0-1.xxxx.rpm to MQSeriesRuntime_1-V.R.0-1.xxxx.rpm. Where V is the version number and R is the number of the Release.

  9. Run the rpm command to apply all available updates for the packages you have on your system:
    • To update an installation in the default location, /opt/mqm:
      
      rpm -ivh MQSeriesRuntime-Uxxxx-V.R.0-1.i386.rpm
        MQSeriesSDK-Uxxxx-V.R.0-1.i386.rpm
        MQSeriesServer-Uxxxx-V.R.0-1.i386.rpm
      
      where V is the version number and R is the number of the Release.
    • To update an installation in a custom location, specify the rpm prefix option:
      
      rpm --prefix /opt/customLocation -ivh MQSeriesRuntime-Uxxxx-V.R.0-1.i386.rpm
        MQSeriesSDK-Uxxxx-V.R.0-1.i386.rpm
        MQSeriesServer-Uxxxx-V.R.0-1.i386.rpm
      
      where V is the version number and R is the number of the Release.

    You must apply all packages in a maintenance update that correspond to those packages that are currently installed on your system.

  10. Repeat step 7 to list the packages that are now available.

    The Runtime, SDK, and Server packages are now at level 1:

    
    MQSeriesRuntime-V.R.0-0
    MQSeriesSDK-V.R.0-0
    MQSeriesServer-V.R.0-0
    MQSeriesRuntime-Uxxxx-V.R.0-1
    MQSeriesSDK-Uxxxx-V.R.0-1
    MQSeriesServer-Uxxxx-V.R.0-1
    
    where V is the version number and R is the number of the Release.
    Note:

    After the installation of IBM MQ fix packs, if you run the rpm-verify or rpm -V command, it does not return the correct results. It produces spurious results relating to missing files in MQ_INSTALLATION_PATH/maintenance.

    This error message can be ignored because it is a known limitation in the IBM MQ fix pack installation code. For further information about this error, see IBM MQ Fix Pack install errors - Linux reports errors

What to do next

For further information about using RPM to install software packages, see your Linux documentation.