[MQ 9.2.0 Jul 2020][Linux][MQ 9.2.0 Jul 2020]

Uninstalling or modifying IBM MQ on Linux Red Hat using yum

On Linux® Red Hat®, you can uninstall the IBM® MQ server or client using the yum command. You can also modify an installation by removing selected packages (components) currently installed on your system.

Before you begin

If you have applied one or more fix packs to the version of IBM MQ that you want to uninstall, you need to remove the fix packs in reverse chronological installation order before you remove the base packages.

You must remove any updates before starting the uninstallation procedure. For more information, see Restoring the previous maintenance level on IBM MQ on Linux .

Important: You must stop all IBM MQ queue managers, other objects, and applications, before you begin the process to uninstall or modify IBM MQ.

Procedure

  1. Stop all IBM MQ applications associated with the installation you are uninstalling or modifying, if you have not already done so.
  2. For a server installation, end any IBM MQ activity associated with the installation you are uninstalling or modifying:
    1. Log in as a user in the group mqm.
    2. Set up your environment to work with the installation you want to uninstall or modify. Enter the following command:
      
      . MQ_INSTALLATION_PATH/bin/setmqenv -s
      
      where MQ_INSTALLATION_PATH refers to the location where IBM MQ is installed.
    3. Display the state of all queue managers on the system. Enter the following command:
      
      dspmq -o installation
      
    4. Stop all running queue managers associated with the installation you want to uninstall or modify. Enter the following command for each queue manager:
      
      endmqm QMgrName
      
    5. Stop any listeners associated with the queue managers. Enter the following command for each queue manager:
      
      endmqlsr -m QMgrName
      
  3. Log in as root.
  4. Uninstall or modify IBM MQ using the yum remove command:
    • On a system with a single installation:
      • Remove the installation by using the following command:
        yum remove MQSeries*
      • Modify the installation to add a component by using the following command:
        yum install packageName
        where packageName specifies the component you want to add.
      • Modify the installation to remove a component by using the following command:
        yum remove packageName
        where packageName specifies the component you want to remove.
    • On a system with a multiple installations:
      • Remove an installation by using the following command:
        yum remove MQSeries*suffix*
        where suffix specifies the suffix that uniquely identifies the installation.
      • Modify the installation to add a component by using the following command:
        yum install packageName*suffix*
        where packageName specifies the component you want to add, and suffix specifies the suffix that uniquely identifies the installation.
      • Modify the installation to remove a component by using the following command:
        yum remove packageName*suffix*
        where packageName specifies the component you want to remove, and suffix specifies the suffix that uniquely identifies the installation.

Results

After uninstallation, certain files under the directory trees /var/mqm and /etc/opt/mqm are not removed. These files contain user data and remain so subsequent installations can reuse the data. Most of the remaining files contain text, such as INI files, error logs, and FDC files. The directory tree /var/mqm/shared contains files that are shared across installations, including the executable shared libraries libmqzsd.so and libmqzsd_r.so.

What to do next

  • If the product successfully uninstalled, you can delete any files and directories contained in the installation directory.
  • If there are no other IBM MQ installations on the system, and you are not planning to reinstall or migrate, you can delete the /var/mqm and /etc/opt/mqm directory trees, including the files libmqzsd.so and libmqzsd_r.so. Deleting these directories destroys all queue managers and their associated data.