Enabling extra libraries

Overview

Each Zato installation contains a directory labeled zato_extra_paths the contents of which is automatically added to PYTHONPATH.

For instance, Zato binaries are installed into /opt/zato/2.0.8 so the zato command is in /opt/zato/2.0.8/bin/zato - hence the full path to zato_extra_paths is /opt/zato/2.0.8/zato_extra_paths.

This directory can be used to enable any libraries, dependencies or services themselves needed for a particular Zato installation.

Each Zato component needs to be stopped and started again for any changes made to zato_extra_paths be picked up

PyMQI and WebSphere MQ

To enable support for the optional connectivity to WebSphere MQ queue managers:

  • Install PyMQI

  • Create symlinks from each PyMQI module to zato_extra_paths, e.g. assuming PyMQI has been installed to /usr/local/lib/python2.7/dist-packages and Zato binaries are in /opt/zato/2.0.8:

    $ ln -s /usr/local/lib/python2.7/dist-packages/pymqe.so /opt/zato/2.0.8/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/pymqi.py /opt/zato/2.0.8/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/CMQC.py /opt/zato/2.0.8/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/CMQCFC.py /opt/zato/2.0.8/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/CMQXC.py /opt/zato/2.0.8/zato_extra_paths
    $ ln -s /usr/local/lib/python2.7/dist-packages/CMQZC.py /opt/zato/2.0.8/zato_extra_paths
  • (Optionally) If there is an

    ImportError: libmqic_r.so: wrong ELF class: ELFCLASS32

    error when starting a server, add an additional path to $LD_LIBRARY_PATH prior to starting it:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mqm/lib64/

cx_Oracle and Oracle Database

To enable optional support for the Oracle Database:

  • Install cx_Oracle

  • Create a symlink from cx_Oracle to zato_extra_paths, e.g. assuming cx_Oracle has been installed to /usr/local/lib/python2.7/dist-packages and Zato binaries are in /opt/zato/2.0.8

    $ ln -s /usr/local/lib/python2.7/dist-packages/cx_Oracle.so /opt/zato/2.0.8/zato_extra_paths