Tuesday, 2 September 2014

Installing IBM WebSphere MQ on Linux

Following on from a previous post: -


I'm getting to grips with IBM Integration Bus 9.0.0.2 and it's prerequisite dependency IBM WebSphere MQ 8.0.

First I'm going to install WMQ ...

I downloaded WMQ from the IBM software download site, resulting in a single TAR file: -

-rw-r--r--@  1 hayd  staff  558767000  2 Sep 06:14 WS_MQ_LINUX_ON_X86_64_V8.0_IMG.tar.gz

This I expanded onto my target RHEL 6.3 box: -

mkdir /tmp/Repo/WMQ
cd /tmp/Repo/WMQ
tar xvzf /mnt/hgfs/Software/WMQ8/WS_MQ_LINUX_ON_X86_64_V8.0_IMG.tar.gz 

This results in a number ( 30 ) of RPMs: -

MQSeriesAMS-8.0.0-0.x86_64.rpm
MQSeriesClient-8.0.0-0.x86_64.rpm
MQSeriesExplorer-8.0.0-0.x86_64.rpm
MQSeriesFTAgent-8.0.0-0.x86_64.rpm
MQSeriesFTBase-8.0.0-0.x86_64.rpm
MQSeriesFTLogger-8.0.0-0.x86_64.rpm
MQSeriesFTService-8.0.0-0.x86_64.rpm
MQSeriesFTTools-8.0.0-0.x86_64.rpm
MQSeriesGSKit-8.0.0-0.x86_64.rpm
MQSeriesJava-8.0.0-0.x86_64.rpm
MQSeriesJRE-8.0.0-0.x86_64.rpm
MQSeriesMan-8.0.0-0.x86_64.rpm
MQSeriesMsg_cs-8.0.0-0.x86_64.rpm
MQSeriesMsg_de-8.0.0-0.x86_64.rpm
MQSeriesMsg_es-8.0.0-0.x86_64.rpm
MQSeriesMsg_fr-8.0.0-0.x86_64.rpm
MQSeriesMsg_hu-8.0.0-0.x86_64.rpm
MQSeriesMsg_it-8.0.0-0.x86_64.rpm
MQSeriesMsg_ja-8.0.0-0.x86_64.rpm
MQSeriesMsg_ko-8.0.0-0.x86_64.rpm
MQSeriesMsg_pl-8.0.0-0.x86_64.rpm
MQSeriesMsg_pt-8.0.0-0.x86_64.rpm
MQSeriesMsg_ru-8.0.0-0.x86_64.rpm
MQSeriesMsg_Zh_CN-8.0.0-0.x86_64.rpm
MQSeriesMsg_Zh_TW-8.0.0-0.x86_64.rpm
MQSeriesRuntime-8.0.0-0.x86_64.rpm
MQSeriesSamples-8.0.0-0.x86_64.rpm
MQSeriesSDK-8.0.0-0.x86_64.rpm
MQSeriesServer-8.0.0-0.x86_64.rpm
MQSeriesXRService-8.0.0-0.x86_64.rpm

First I needed to accept the license agreement: -

./mqlicense.sh 

...
Press Enter to continue viewing the license agreement, or 
enter "1" to accept the agreement, "2" to decline it, "3" 
to print it, "4" to read non-IBM terms, or "99" to go back 
to the previous screen.
1

Agreement accepted:  Proceed with install.

...

I then ran a loop to install the RPMs: -

for i in *.rpm; do rpm --prefix /opt/ibm/mqm -ivh $i; done

I needed to run this several times as  some RPMs depend upon others that have yet to be installed.

Eventually, all were installed: -

...
Preparing...                ########################################### [100%]
package MQSeriesMsg_Zh_TW-8.0.0-0.x86_64 is already installed
Preparing...                ########################################### [100%]
package MQSeriesRuntime-8.0.0-0.x86_64 is already installed

...

which I validated: -

rpm -qa | grep MQSeries

MQSeriesServer-8.0.0-0.x86_64
MQSeriesJRE-8.0.0-0.x86_64
MQSeriesMsg_es-8.0.0-0.x86_64
MQSeriesMsg_ja-8.0.0-0.x86_64
MQSeriesMsg_ru-8.0.0-0.x86_64
MQSeriesExplorer-8.0.0-0.x86_64
MQSeriesGSKit-8.0.0-0.x86_64
MQSeriesRuntime-8.0.0-0.x86_64
MQSeriesSDK-8.0.0-0.x86_64
MQSeriesAMS-8.0.0-0.x86_64
MQSeriesJava-8.0.0-0.x86_64
MQSeriesMan-8.0.0-0.x86_64
MQSeriesMsg_de-8.0.0-0.x86_64
MQSeriesMsg_fr-8.0.0-0.x86_64
MQSeriesMsg_it-8.0.0-0.x86_64
MQSeriesMsg_ko-8.0.0-0.x86_64
MQSeriesMsg_pt-8.0.0-0.x86_64
MQSeriesMsg_Zh_CN-8.0.0-0.x86_64
MQSeriesXRService-8.0.0-0.x86_64
MQSeriesFTBase-8.0.0-0.x86_64
MQSeriesFTTools-8.0.0-0.x86_64
MQSeriesFTAgent-8.0.0-0.x86_64
MQSeriesSamples-8.0.0-0.x86_64
MQSeriesClient-8.0.0-0.x86_64
MQSeriesMsg_cs-8.0.0-0.x86_64
MQSeriesMsg_hu-8.0.0-0.x86_64
MQSeriesMsg_pl-8.0.0-0.x86_64
MQSeriesMsg_Zh_TW-8.0.0-0.x86_64
MQSeriesFTLogger-8.0.0-0.x86_64
MQSeriesFTService-8.0.0-0.x86_64

rpm -qa | grep MQSeries | wc

     30      30     905

I did have one small fright - when I listed the contents of the /opt/ibm/mqm/bin directory, this is what I saw: -


and I assumed that the use of the red font indicated a problem with the installation :-(

Actually, it's NOT a problem - it's merely my shell's way of showing me that the red-flagged binaries have the sticky bit set, meaning that they'll always be executed with the mqm user.

Unlike earlier versions, the MQConfig command is shipped with WMQ 8: -

ls -al `locate mqconfig`

-r-xr-xr-x 1 mqm mqm 51989 Apr 29 15:54 /opt/mqm/bin/mqconfig

This I ran: -

/opt/mqm/bin/mqconfig 

mqconfig: V3.7 analyzing Red Hat Enterprise Linux Server release 6.3
          (Santiago) settings for WebSphere MQ V8.0

System V Semaphores
  semmsl     (sem:1)  250 semaphores                     IBM>=32           PASS
  semmns     (sem:2)  122 of 256000 semaphores   (0%)    IBM>=4096         PASS
  semopm     (sem:3)  32 operations                      IBM>=32           PASS
  semmni     (sem:4)  109 of 2048 sets           (5%)    IBM>=128          PASS

System V Shared Memory
  shmmax              68719476736 bytes                  IBM>=268435456    PASS
  shmmni              8 of 4096 sets             (0%)    IBM>=4096         PASS
  shmall              425311 of 4294967296 pages (0%)    IBM>=2097152      PASS

System Settings
  file-max            4992 of 792980 files       (0%)    IBM>=524288       PASS

Current User Limits (root)
  nofile       (-Hn)  8800 files                         IBM>=10240        WARN
  nofile       (-Sn)  8800 files                         IBM>=10240        WARN

  nproc        (-Hu)  0 of 8800 processes        (0%)    IBM>=4096         PASS
  nproc        (-Su)  0 of 8800 processes        (0%)    IBM>=4096         PASS


Following the recommendations, I increased the nofile ulimits from 8800 to 10240, by editing /etc/security/limits.conf from: -

# End of file
* hard nofile 8800
* soft nofile 8800

to: -

# End of file
* hard nofile 10240
* soft nofile 10240

One log out later, and we're good to go: -

mqconfig: V3.7 analyzing Red Hat Enterprise Linux Server release 6.3
          (Santiago) settings for WebSphere MQ V8.0

System V Semaphores
  semmsl     (sem:1)  250 semaphores                     IBM>=32           PASS
  semmns     (sem:2)  122 of 256000 semaphores   (0%)    IBM>=4096         PASS
  semopm     (sem:3)  32 operations                      IBM>=32           PASS
  semmni     (sem:4)  109 of 2048 sets           (5%)    IBM>=128          PASS

System V Shared Memory
  shmmax              68719476736 bytes                  IBM>=268435456    PASS
  shmmni              8 of 4096 sets             (0%)    IBM>=4096         PASS
  shmall              425311 of 4294967296 pages (0%)    IBM>=2097152      PASS

System Settings
  file-max            4992 of 792980 files       (0%)    IBM>=524288       PASS

Current User Limits (root)
  nofile       (-Hn)  10240 files                        IBM>=10240        PASS
  nofile       (-Sn)  10240 files                        IBM>=10240        PASS
  nproc        (-Hu)  0 of 8800 processes        (0%)    IBM>=4096         PASS
  nproc        (-Su)  0 of 8800 processes        (0%)    IBM>=4096         PASS


I created a dedicated group/user for WMQ: -

groupadd mqm
useradd -g mqm -d /home/mqm mqm
passwd mqm

To test WMQ, I following part of the instructions in this excellent IBM White Paper: -


as user mqm.

...
Create queue manager, with a Dead Letter Queue (DLQ)

crtmqm -u SYSTEM.DEAD.LETTER.QUEUE QM_MDB

Start the queue manager

strmqm QM_MDB

Invoke the administration utility

runmqsc QM_MDB

Within runmqsc, define and start an MQ Listener:

DEFINE LISTENER(TCP.LISTENER) TRPTYPE(TCP) CONTROL(QMGR) PORT(1420)

START LISTENER(TCP.LISTENER)

Define a channel to be used with the MQ Explorer (optional but very useful!):

DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)

Define a local queue:

DEFINE QLOCAL(Q_MDB)


Define a topic object:

DEFINE TOPIC(T_MDB) TOPICSTR('sports')

For MQ 7.1 and 7.5, and if desiring to allow remote connections by an MQ Administrator:

set CHLAUTH(*) TYPE(BLOCKUSER) USERLIST('nobody','*MQADMIN')
set CHLAUTH(SYSTEM.ADMIN.*) TYPE(BLOCKUSER) USERLIST('nobody')

Exit runmqsc:

END
...

I then continued to follow the White Paper to configure WebSphere Application Server (WAS) to access the QM_MDB Queue Manager, using JMS / Activation Specifications.

Which is nice :-)

No comments: