[root@rhv6-64b ~]# su - mqm

-bash-4.1$ dspmq

-bash: dspmq: command not found(dspmq命令找不到)

-bash-4.1$ dspmqver(dspmqver主安装目录设置不正确)

AMQ8594: WebSphere MQ commands are no longer available in /usr/bin.

In order to run MQ commands you must manage your path configuration asdescribed in the WebSphere MQ product documentation.

In particular review thetopic on "Choosing a primary installation".

-bash-4.1$

InfoCenter,Choosing a primary installation:On UNIX and Linux platforms, the first installation onto a system must be manually configured to be the primary installation. Set the primary installation using the setmqinst command.(可以通过setmqinst命令设置主安装目录)

-bash-4.1$ /opt/mqm/bin/dspmqinst

InstName: Installation1

InstDesc:Identifier: 1

InstPath: /opt/mqm

Version: 7.5.0.0

Primary: No

State: Available

[root@rhv6-64b ~]# /opt/mqm/bin/setmqinst -n Installation1 -i

114 of 114 tasks have been completed successfuly.'Installation1' (/opt/mqm) set as the Primary Installation.(设置/opt/mqm为主安装目录)

PATH=$PATH:/opt/mqm/bin

export PATH(将/opt/mqm/bin加入到环境变量PATH中,解决mq命令在命令行报命令找不到的错误,但是并不建议用这种方式添加,因为当退出终端时,改配置就失效,下次进入仍然报错,建议到/etc/profile添加)

[root@rhv6-64b ~]# su - mqm

-bash-4.1$ dspmqver

Name: WebSphere MQ

Version: 7.5.0.0

Level: p000-L120604

BuildType: IKAP - (Production)

Platform: WebSphere MQ for Linux (x86-64 platform)

Mode: 64-bitO/S: Linux 2.6.32-131.0.15.el6.x86_64Inst

Name: Installation1Inst

Desc:InstPath: /opt/mqm

DataPath: /var/mqm

Primary: Yes

MaxCmdLevel: 750

参考链接:https://blog.csdn.net/crazyitlhs/article/details/49122277

05-02 01:24