WebSphere MQ V7.1 no Fedora 18

IBM Websphere MQ é um provedor de middleware de mensageria baseado na especificação Java Message Service (JMS) e Message Queueing Interface (MQI), que permite que mensagens sejam transmitidas através de filas e tópicos.

mqexplorerCom JMS (e como tal, também com o IBM Websphere MQ) é possível processá-las de dois métodos básicos:

Filas: Uma mensagem pode ser enviada para uma fila de MQ e pode ser recebida por exatamente um consumidor. Se não houver nenhum consumidor disponível no momento em que a mensagem é enviada, ela será mantida até que o consumidor esteja disponível para processar a mensagem. Isto é também conhecido como um modelo point-to-point.

Tópicos: O Websphere MQ implementa a semântica de publish/subscribe. Quando você publicar uma mensagem, ela vai para todos os assinantes que estejam interessados e receberão uma cópia da mensagem. Somente assinantes que possuírem uma assinatura válida poderá receber uma cópia da mensagem.

Download

Download: WebSphere MQ V7.1.0 Trial

Obs: caso não tenha, é necessário efetuar cadastro antes de baixar a versão trial.

Pré-Instalação

Antes de instalar o WebSphere MQ 7.1 vamos criar o usuário adminstrador e o grupo:

groupadd mqm
useradd -m -g mqm mqm
su - mqm
exit

Obs: qualquer usuário pertencente ao grupo mqm poderá ser administrador do sistema

Instalação

Depois de baixar o arquivo, crie uma pasta em algum diretório temporário e descompacte o pacote MQ_7.1_TRIAL_FOR_LNX_ON_X86_32_ML.tar.gz:
su -
# mkdir /tmp/mq7

# tar -vzxf MQ_7.1_TRIAL_FOR_LNX_ON_X86_32_ML.tar.gz

Copie o conteudo extraído para /tmp/mq7

[root@hostsfantin mq7]# pwd
/tmp/mq7
[root@hostsfantin mq7]# ll

total 306320
-r–r–r–  1 root root       261 May 22 15:04 copyright
-rwxr-xr-x  1 root root      4597 May 22 15:04 crtmqpkg
drwxr-xr-x  4 root root       100 May 22 15:04 lap
drwxr-xr-x  2 root root       760 May 22 15:04 licenses
-rwxr-xr-x  1 root root      5235 May 22 15:04 mqlicense.sh
-rw-r–r–  1 root root   4185262 May 22 15:04 MQSeriesClient-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root 139650246 May 22 15:04 MQSeriesExplorer-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root  22390922 May 22 15:04 MQSeriesGSKit-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root  23912458 May 22 15:04 MQSeriesJava-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root  71104044 May 22 15:04 MQSeriesJRE-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    293298 May 22 15:04 MQSeriesMan-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    148073 May 22 15:04 MQSeriesMsg_cs-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    153852 May 22 15:04 MQSeriesMsg_de-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    146838 May 22 15:04 MQSeriesMsg_es-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    147192 May 22 15:04 MQSeriesMsg_fr-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    150271 May 22 15:04 MQSeriesMsg_hu-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    148131 May 22 15:04 MQSeriesMsg_it-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    138241 May 22 15:04 MQSeriesMsg_ja-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    132175 May 22 15:04 MQSeriesMsg_ko-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    148903 May 22 15:04 MQSeriesMsg_pl-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    148201 May 22 15:04 MQSeriesMsg_pt-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    141296 May 22 15:04 MQSeriesMsg_ru-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    136366 May 22 15:04 MQSeriesMsg_Zh_CN-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    138391 May 22 15:04 MQSeriesMsg_Zh_TW-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root  19001515 May 22 15:04 MQSeriesRuntime-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    832794 May 22 15:04 MQSeriesSamples-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root    244390 May 22 15:04 MQSeriesSDK-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root  27569348 May 22 15:04 MQSeriesServer-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root     38759 May 22 15:04 MQSeriesTXClient-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root   1016503 May 22 15:04 MQSeriesXRClients-7.1.0-2.x86_64.rpm
-rw-r–r–  1 root root   1477433 May 22 15:04 MQSeriesXRService-7.1.0-2.x86_64.rpm
drwxr-xr-x  3 root root        60 May 22 15:04 PreReqs
drwxr-xr-x 18 root root       360 May 22 15:04 READMEs
drwxr-xr-x  2 root root       560 May 22 15:04 repackage

Aceitar a licença

Execute o seguinte comando para aceitar a licença do MQ:

[root@hostsfantin mq7]# ./mqlicense.sh -accept

Licensed Materials – Property of IBM

5724-H72

(C) Copyright IBM Corporation 1994, 2011 All rights reserved.

US Government Users Restricted Rights – Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.

Agreement accepted:  Proceed with install.

Criar os RPMs

Execute o seguinte comando para criar os rpms:

[root@hostsfantin mq7]# ./crtmqpkg 1

Repackaging WebSphere MQ for “x86_64” using suffix “1”
#####################################################
Repackaging complete  – rpms are at “/var/tmp/mq_rpms/1/x86_64”

Aponte o terminal para o diretório /var/tmp/mq_rpms/1/x86_64:

cd /var/tmp/mq_rpms/1/x86_64

[root@hostsfantin mq7]# cd /var/tmp/mq_rpms/1/x86_64
[root@hostsfantin x86_64]# ll
total 281580
-rw-r–r– 1 root root 3506836 May 22 15:17 MQSeriesClient_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 124633624 May 22 15:18 MQSeriesExplorer_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 21902376 May 22 15:18 MQSeriesGSKit_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 23701228 May 22 15:18 MQSeriesJava_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 70677048 May 22 15:19 MQSeriesJRE_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 312728 May 22 15:19 MQSeriesMan_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 157996 May 22 15:19 MQSeriesMsg_cs_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 169932 May 22 15:19 MQSeriesMsg_de_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 159264 May 22 15:19 MQSeriesMsg_es_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 160704 May 22 15:19 MQSeriesMsg_fr_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 160976 May 22 15:19 MQSeriesMsg_hu_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 160348 May 22 15:19 MQSeriesMsg_it_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 150520 May 22 15:19 MQSeriesMsg_ja_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 143876 May 22 15:19 MQSeriesMsg_ko_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 161048 May 22 15:19 MQSeriesMsg_pl_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 158548 May 22 15:19 MQSeriesMsg_pt_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 151748 May 22 15:19 MQSeriesMsg_ru_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 138312 May 22 15:19 MQSeriesMsg_Zh_CN_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 140868 May 22 15:19 MQSeriesMsg_Zh_TW_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 14545500 May 22 15:19 MQSeriesRuntime_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 758896 May 22 15:19 MQSeriesSamples_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 230476 May 22 15:19 MQSeriesSDK_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 23687184 May 22 15:20 MQSeriesServer_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 35048 May 22 15:20 MQSeriesTXClient_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 811784 May 22 15:20 MQSeriesXRClients_1-7.1.0-2.x86_64.rpm
-rw-r–r– 1 root root 1453160 May 22 15:20 MQSeriesXRService_1-7.1.0-2.x86_64.rpm

Obs: percebam a diferença no nome dos arquivos gerados. O parâmetro passado no comando crtmqpkg 1 adicionou _1 em cada pacote gerado:
Antes: MQSeriesClient-7.1.0-2.x86_64.rpm
Depois: MQSeriesClient_1-7.1.0-2.x86_64.rpm

Execute o comando para executar os rpms gerados:

[root@hostsfantin x86_64]# rpm -ivh MQSeries*.rpm

Preparing…                          ################################# [100%]
Updating / installing…
1:MQSeriesRuntime_1-7.1.0-2        ################################# [  4%]
2:MQSeriesJRE_1-7.1.0-2            ################################# [  8%]
3:MQSeriesJava_1-7.1.0-2           ################################# [ 12%]
4:MQSeriesClient_1-7.1.0-2         ################################# [ 15%]
5:MQSeriesServer_1-7.1.0-2         ################################# [ 19%]
6:MQSeriesXRService_1-7.1.0-2      ################################# [ 23%]
7:MQSeriesTXClient_1-7.1.0-2       ################################# [ 27%]
8:MQSeriesExplorer_1-7.1.0-2       ################################# [ 31%]
9:MQSeriesGSKit_1-7.1.0-2          ################################# [ 35%]
10:MQSeriesMan_1-7.1.0-2            ################################# [ 38%]
11:MQSeriesMsg_cs_1-7.1.0-2         ################################# [ 42%]
12:MQSeriesMsg_de_1-7.1.0-2         ################################# [ 46%]
13:MQSeriesMsg_es_1-7.1.0-2         ################################# [ 50%]
14:MQSeriesMsg_fr_1-7.1.0-2         ################################# [ 54%]
15:MQSeriesMsg_hu_1-7.1.0-2         ################################# [ 58%]
16:MQSeriesMsg_it_1-7.1.0-2         ################################# [ 62%]
17:MQSeriesMsg_ja_1-7.1.0-2         ################################# [ 65%]
18:MQSeriesMsg_ko_1-7.1.0-2         ################################# [ 69%]
19:MQSeriesMsg_pl_1-7.1.0-2         ################################# [ 73%]
20:MQSeriesMsg_pt_1-7.1.0-2         ################################# [ 77%]
21:MQSeriesMsg_ru_1-7.1.0-2         ################################# [ 81%]
22:MQSeriesMsg_Zh_CN_1-7.1.0-2      ################################# [ 85%]
23:MQSeriesMsg_Zh_TW_1-7.1.0-2      ################################# [ 88%]
24:MQSeriesSamples_1-7.1.0-2        ################################# [ 92%]
25:MQSeriesSDK_1-7.1.0-2            ################################# [ 96%]
26:MQSeriesXRClients_1-7.1.0-2      ################################# [100%]

Verificando a instalação

Aponte o terminal para o diretório /opt/mqm/bin e execute o seguinte comando:

[root@hostsfantin x86_64]# cd /opt/mqm/bin
[root@hostsfantin bin]# ./setmqinst -i -p /opt/mqm

114 of 114 tasks have been completed successfuly.
‘Installation1’ (/opt/mqm) set as the Primary Installation.

Como usuário mqm execute os seguintes comandos:

[mqm@hostsfantin ~]$ . /opt/mqm/bin/setmqenv -s
[mqm@hostsfantin ~]$ dspmqver

Name:        WebSphere MQ
Version:     7.1.0.2
Level:       p710-002-121126
BuildType:   IKAP – (Production)
Platform:    WebSphere MQ for Linux (x86-64 platform)
Mode:        64-bit
O/S:         Linux 3.9.2-200.fc18.x86_64
InstName:    Installation1
InstDesc:
InstPath:    /opt/mqm
DataPath:    /var/mqm
Primary:     Yes
MaxCmdLevel: 711

Saindo:

[mqm@hostsfantin ~]$ exit

Diretório de instalação

Depois de instalado, os arquivos de instalação e dados ficarão nos seguintes diretórios:

  1. /opt/mqm

  2. /var/mqm

No próximo post ensinarei como criar uma fila no WebSphere MQ.



Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s