Applying maintenance level updates on Linux using RPM
We can apply maintenance level updates to IBM MQ on Linux by using RPM. The same procedure applies to all Linux platforms, including Ubuntu.
Before starting
If we are running on a server with multiple IBM MQ installations, we 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.
We 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. We must obtain these from the 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. We 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, we should not attempt this process. Installing a fix pack at the same level as the one already on the system, can leave the package management database of our system in an inconsistent state with respect to the installation of IBM MQ.
Procedure
- Log in as a user in group mqm.
- Stop all applications using the IBM MQ installation.
If we 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.
- Stop the mqweb server that is associated with the IBM MQ installation:
- Check whether the mqweb server is running by entering the following command:
dspmqweb status- Stop the mqweb server by entering the following command:
endmqweb
- End all the activity of queue managers associated with the IBM MQ installation.
- 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 we are updating:
dspmq -o installation -o status dspmq -adspmq -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.
- 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- Run the endmqm command to stop each running queue manager associated with this installation.
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, we must find another way to force applications to release IBM MQ resources, such as by stopping the applications.
We 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 UNIX and 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.- Stop any listeners associated with the queue managers, using the command:
endmqlsr -m QMgrName
- Log in as root, or switch to the superuser using the su command.
- Change into the directory containing the maintenance packages.
- 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.rpmwhere V is the version number and R is the number of the Release.- Run the rpm command to find out which packages are installed on your server.
Enter the following command:
rpm -qa | grep MQSeriesNote: If we are using rpm on Ubuntu, add the --force-debian attribute.rpm --force-debian -qa | grep MQSeriesFor 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-0where V is the version number and R is the number of the Release.- 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, we can ignore this step. We must install the pax command in order for the crtmqfp command to run on Linux.
- Run the command ./crtmqfp suffixname where suffixname is the same as the suffix used during renaming of the base level IBM MQ installation.
- 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 we 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 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.
- Run the rpm command to apply all available updates for the packages you have on the 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.rpmwhere 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.rpmwhere V is the version number and R is the number of the Release.
We must apply all packages in a maintenance update that correspond to those packages that are currently installed on the system.
- 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-1where 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 the Linux documentation. Parent topic: Applying and removing maintenance on UNIX and Linux
Related tasks
Related information