[Linux]

Applying maintenance level updates on Linux using RPM

You can apply maintenance level updates to IBM® MQ on Linux® by using RPM. The same 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 RPM Package Manager (RPM) update images, which are applied using the RPM installation tool.

You can apply and remove maintenance from an 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.

[MQ 9.2.0.2 Mar 2021]From IBM MQ 9.2.0 Fix Pack 2, you can use the additional option InstallPATH. If you add InstallPATH to the crtmqfp command you use to install the maintenance update, the update is installed directly into the directory specified by InstallPATH.

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 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. Stop the mqweb server that is associated with the IBM MQ installation:
    1. Check whether the mqweb server is running by entering the following command:
      dspmqweb status
    2. Stop the mqweb server by entering the following command:
      endmqweb
  4. 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. Use the MQSC command DISPLAY LSSTATUS to list the status of listeners associated with a queue manager, as shown in the following example:
      
      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 diagram endmqm -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: Applying maintenance level updates to multi-instance queue managers on Linux 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
      
  5. Log in as root, or with sufficient authority to run the following commands.

    You can do this by adding sudo before the commands, or by changing to the root user in the shell with the su command. For more information, see Exploring the differences between sudo and su commands in Linux.

  6. Change into the directory containing the maintenance packages.
  7. 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.
  8. Run the rpm command to find out which packages are installed on your server.

    Enter the following command:

    
    rpm -qa | grep MQSeries
    
    Note: If you are using rpm on Ubuntu, add the --force-debian attribute.
    
    rpm --force-debian -qa | grep MQSeries
    
    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.
  9. 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.

      [MQ 9.2.0.2 Mar 2021]From IBM MQ 9.2.0 Fix Pack 2, you can use the InstallPATH option with the crtmqfp command. The update is then installed directly into the directory specified by InstallPATH.

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

    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.

      There is now a subdirectory named /var/tmp/mq_rpms/1/xxxx, and the packages will be renamed, for example, from MQSeries®Runtime-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.

  10. 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.

  11. Repeat step 8 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 installation errors - Linux reports errors

What to do next

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