Suganthan Raj
Suganthan Raj

Reputation: 1970

How to get default installation directory for IBM MQ in linux and unix?

`I have used MQ_INSTALLATION_PATH in linux

when i execute above in the path /opt/mqm/bin via root it cannot display nothing but when i execute it in the path /opt/mqm/samp/bin it displays MQ_INSTALLATION_PATH .. before i should execute crtmqenv -p command

So what a solution to get installation path of IBM MQ?

Upvotes: 1

Views: 5443

Answers (1)

JoshMc
JoshMc

Reputation: 10652

MQ v7.1 and higher support multiple installations on the same server. The command setmqenv when sourced will setup some environment variables to allow you to use a specific installation. One of the variables that is set by setmqenv is $MQ_INSTALLATION_PATH. You can display the value of this variable with the command echo $MQ_INSTALLATION_PATH.

$ echo $MQ_INSTALLATION_PATH
/opt/mqm

If the installation has been setup as default using the setmqinst command, then various symlinks will be created under /usr/bin pointed back to the mq installation directory. You can display the installation directory by running the /usr/bin/dspmqver command and looking for InstPath in the output.

You can also directly call the command dspmqver -f 128 to have it return just the installation path:

InstPath:    /opt/mqm

If the install is not setup as the default install and you do not know which directory MQ is installed in you can look at the /etc/opt/mqm/mqinst.ini file which will have a stanza for each installation on the server. The installation path is listed after FilePath= under each Installation stanza.

$ cat /etc/opt/mqm/mqinst.ini
Installation:
   Name=Installation1
   Description=
   Identifier=1
   FilePath=/opt/mqm

Upvotes: 1

Related Questions