install IBM MQ 9.1 on Ubuntu

  1. download IBM_MQ_9.1.5_UBUNTU_X86-64.tar.gz from IBM site and unzip it to /tmp
  2. create mqm user and group on Ubuntu:
    root@ubunu2004:/usr/lib# useradd mqm -m -s /bin/bash
    root@ubunu2004:/usr/lib# id mqm
    uid=1001(mqm) gid=1001(mqm) groups=1001(mqm)
  3. create filesystem/dir for MQ
    mkdir /var/mqm
    mkdir -p /var/mqm/errors
    mkdir -p /var/mqm/trace
    mkdir -p /var/mqm/qmgrs
    mkdir -p /var/mqm/log
    chown -R mqm:mqm /var/mqm
  4. make sure Linux already installed libgcc_s.so and libstdc++.so.6
  5. update threads-max and nofile setting for system and users
    echo 32768 > /proc/sys/kernel/threads-max
    ulimit -n 10240
    or add below lines into /etc/security/limits.conf for nofile limit:

    * soft     nproc          65535
    * hard     nproc          65535
    * soft     nofile         65535
    * hard     nofile         65535
    root soft     nproc          65535
    root hard     nproc          65535
    root soft     nofile         65535
    root hard     nofile         65535
  6. start installation with root:
    cd /tmp/MQServer/
    ./mqlicense.sh -text_only
    apt install ./ibmmq-runtime_9.1.5.0_amd64.deb
    apt install ./ibmmq-gskit_9.1.5.0_amd64.deb
    apt install ./ibmmq-server_9.1.5.0_amd64.deb

    apt install ./ibmmq-jre_9.1.5.0_amd64.deb
    apt install ./ibmmq-java_9.1.5.0_amd64.deb
    apt install ./ibmmq-explorer_9.1.5.0_amd64.deb
    apt install ./ibmmq-samples_9.1.5.0_amd64.deb
    …..
    you can install other packages if you want, but we need at least runtime, gskit and server for a MQ env.
  7. create and start qmgr with mqm ID
    su – mqm
    cd /opt/mqm/bin
    ./crtmqm -q -d MY.DEFAULT.XMIT.QUEUE -u SYSTEM.DEAD.LETTER.QUEUE SATURN.QUEUE.MANAGER
    ./strmqm SATURN.QUEUE.MANAGER
    ./endmqm SATURN.QUEUE.MANAGER
    ./dspmq -m SATURN.QUEUE.MANAGER
    mqm@ubunu2004:/opt/mqm/bin$ ./dspmq -m SATURN.QUEUE.MANAGER
    QMNAME(SATURN.QUEUE.MANAGER) STATUS(Running)
    mqm@ubunu2004:/opt/mqm/bin$ ./dltmqm qmgr1
    IBM MQ queue manager ‘qmgr1’ deleted.
  8. verify the installation with command
    you can setup your default mqm env first:
    mqm@ubunu2004:/opt/mqm/bin$ source /opt/mqm/bin/setmqenv -s
    then create a new qmgr and putmsg/getmsg:
    crtmqm QMA
    strmqm QMA
    mqm@ubunu2004:~$ runmqsc QMA
    5724-H72 (C) Copyright IBM Corp. 1994, 2020.
    Starting MQSC for queue manager QMA.
    AMQ8521I: Command completion and history unavailable.

DEFINE QLOCAL (QUEUE1)
1 : DEFINE QLOCAL (QUEUE1)
AMQ8006I: IBM MQ queue created.
DEFINE CHANNEL(channel_test) CHLTYPE(CLNTCONN) CONNAME(192.168.0.43)
3 : DEFINE CHANNEL(channel_test) CHLTYPE(CLNTCONN) CONNAME(192.168.0.43)
AMQ8014I: IBM MQ channel created.
DEFINE LISTENER(LISTENER.1414.TCP) TRPTYPE(TCP) PORT(1414)
4 : DEFINE LISTENER(LISTENER.1414.TCP) TRPTYPE(TCP) PORT(1414)
AMQ8626I: IBM MQ listener created.
START LISTENER(LISTENER.1414.TCP)
5 : START LISTENER(LISTENER.1414.TCP)
AMQ8021I: Request to start IBM MQ listener accepted.

end
2 : end
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.

mqm@ubunu2004:~$ cd /opt/mqm/samp/bin

mqm@ubunu2004:/opt/mqm/samp/bin$ ./amqsput QUEUE1 QMA
Sample AMQSPUT0 start
target queue is QUEUE1
this is my test msg.
hi

Sample AMQSPUT0 end
mqm@ubunu2004:/opt/mqm/samp/bin$ ./amqsget QUEUE1 QMA
Sample AMQSGET0 start
message <this is my test msg.>
message <hi>

no more messages
Sample AMQSGET0 end
Categoriesmq

One Reply to “install IBM MQ 9.1 on Ubuntu”

  1. Hello! I’ve been following your weblog for a while now and finally got the courage to
    go ahead and give you a shout out from Kingwood Texas!
    Just wanted to mention keep up the great job!

Leave a Reply

Your email address will not be published. Required fields are marked *