WebSphere MQ7 在Ubuntu上的安装
  nzOJE50ROQlt 2023年11月02日 48 0


可参照文档http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amq1ac.doc/lq10120_.htm

1. Download WebSphere MQ7 tar.gz
2. run tar -zxvf CZ4VDML.tar.gz
3(optional). 创建WebSphere MQ 必需的文件系统,命令如下:
   # for product code
   mkdir /opt/mqm
   # for working data
   mkdir /var/mqm
   网上看到说MQ安装时候默认的目录就是这两个
4. 创造MQ用户和用户组,命令如下:
   groupadd mqm
   useradd -d /var/mqm -g mqm -G mqm mqm
   # change password to "password"
   passwd mqm
5. 为mqm用户组添加root组
   cd /etc
   vi group
   找到mqm:x:1003:mqm增加",root",修改成: mqm:x:1003:mqm,root
6(optional). 调整系统参数(视需要而定,我安装时并没修改)
   make following kernel changes (/etc/sysctl.conf ):
   kernel.msgmni = 1024
   kernel.shmmni = 4096
   kernel.shmall = 2097152
   kernel.sem = 500 256000 250 1024
   fs.file-max = 32768
   net.ipv4.tcp_keepalive_time = 300

   To load these sysctl values immediately, enter the command sysctl -p.
   If you do not issue the sysctl -p command, the new values are loaded when the system is rebooted.
7. 安装rpm
   sudo apt-get install rpm
8. 转到WebSphere MQ解压后的目录中,获得WebSphere MQ授权,命令如下:
   ./mqlicense.sh -text_only
   阅读全文后,选择1接受授权。
9. 安装WebSphere MQ客户端和服务端,命令如下:
        rpm --nodeps -ivh MQSeriesRuntime-7.0.1-0.i386.rpm
        rpm --nodeps -ivh MQSeriesSDK-7.0.1-0.i386.rpm
        rpm --nodeps -ivh MQSeriesJava-7.0.1-0.i386.rpm
        rpm --nodeps -ivh MQSeriesClient-7.0.1-0.i386.rpm
        rpm --nodeps -ivh MQSeriesSamples-7.0.1-0.i386.rpm

        rpm -nodeps -ivh MQSeriesServer-7.0.1-0.i386.rpm(如果只装客户端,这个没必要安装)
   原因: 不加-nodeps会报:
   root@localhost:/apps# rpm -ivh MQSeriesRuntime-7.0.1-0.i386.rpm
   error: Failed dependencies:
          /bin/sh is needed by MQSeriesRuntime-7.0.1-0.i386
10. 安装校验
    rpm -qa | grep MQSeries
    MQSeriesSDK-7.0.1-0
    MQSeriesClient-7.0.1-0
    MQSeriesServer-7.0.1-0
    MQSeriesRuntime-7.0.1-0
    MQSeriesJava-7.0.1-0
    MQSeriesSamples-7.0.1-0

    安装MQ Explorer还需要安装其它的包:

    MQSeriesConfig-7.0.1-0.i386.rpm

    MQSeriesEclipseSDK33-7.0.1-0.i386.rpm

    MQSeriesJRE-7.0.1-0.i386.rpm

至此MQ安装完成。

下面简要说明一下MQ的配置操作:
安装完MQ,程序本身会把/opt/mqm/bin/目录下面的一些程序链接到/usr/bin/下面,例如crtmqm,runmqsc等等,这些命令只有安装了服务端才有。

     1:  创建队列管理器
           crtmqm –q QMgrName
           -q是指创建缺省的队列管理器 。
     for example:
     root@localhost:/apps# su mqm
     $ crtmqm -q QMGR

       WebSphere MQ queue manager created.
       Directory '/var/mqm/qmgrs/QMGR' created.
       Creating or replacing default objects for QMGR.
       Default objects statistics : 65 created. 0 replaced. 0 failed.
       Completing setup.
       Setup completed.

     2:  删除队列管理器
           dltmqm QMgrName

     3:  启动队列管理器
          strmqm QmgrName
          如果是启动默认的队列管理器,可以不带其名字

     4: 停止队列管理器
         endmqm QmgrName 受控停止
         endmqm –i QmgrName 立即停止
         endmqm –p QmgrName 强制停止

    5:  显示队列管理器
          dspmq –m QmgrName
          如果输入dspmq,那么显示的是默认的队列管理器。

     6: 运行MQSeries命令
           runmqsc QmgrName
          如果是默认队列管理器,可以不带其名字

     7:往队列中放消息
          amqsput QName QmgrName
          如果队列是默认队列管理器中的队列,可以不带其队列管理器的名字
          从队列中取出消息
          amqsget QName QmgrName
          如果队列是默认队列管理器中的队列,可以不带其队列管理器的名字


     8:启动通道
          runmqchl –c ChlName –m QmgrName
          启动侦听
          runmqlsr –t TYPE –p PORT –m QMgrName
          停止侦听
          endmqlsr -m QmgrName

     9: 定义死信队列
         DEFINE QLOCAL(QNAME) DEFPSIST(YES) REPLACE
         设定队列管理器的死信队列
         ALTER QMGR DEADQ(QNAME)
         定义本地队列
         DEFINE QL(QNAME) REPLACE
         定义别名队列
         DEFINE QALIAS(QALIASNAME) TARGQ(QNAME)
         远程队列定义
         DEFINE QREMOTE(QRNAME) + RNAME(AAA) RQMNAME(QMGRNAME) + XMITQ(QTNAME)

         定义模型队列
         DEFINE QMODEL(QNAME) DEFTYPE(TEMPDYN)

         定义本地传输队列
         DEFINE QLOCAL(QTNAME) USAGE(XMITQ) DEFPSIST(YES) +
         INITQ(SYSTEM.CHANNEL.INITQ)+
         PROCESS(PROCESSNAME) REPLACE


    10:创建发送方通道
         DEFINE CHANNEL(SDRNAME) CHLTYPE(SDR)+
         CONNAME(‘100.100.100.215(1418)’) XMITQ(QTNAME) REPLACE
         其中CHLTYPE可以是:SDR、SVR、RCVR、RQSTR、CLNTCONN、SVRCONN、CLUSSDR和CLUSRCVR。

         创建接收方通道
         DEFINE CHANNEL(SDR_ TEST) CHLTYPE(RCVR) REPLACE

         创建服务器连接通道
         DEFINE CHANNEL(SVRCONNNAME) CHLTYPE(SVRCONN) REPLACE

         显示队列的所有属性
         DISPLAY QUEUE(QNAME) [ALL]

         显示队列的所选属性
         DISPLAY QUEUE(QNAME) DESCR GET PUT
         DISPLAY QUEUE(QNAME)MAXDEPTH CURDEPTH

         显示队列管理器的所有属性
         DISPLAY QMGR [ALL]

         显示进程定义
         DISPLAY PROCESS(PRONAME)

         更改属性
         ALTER QMGR DESCR(‘NEW DESCRIPTION’)
         ALTER QLOCAL(QNAME) PUT(DISABLED)
         ALTER QALIAS(QNAME) TARGQ(TARGQNAME)

        删除队列
        DELETE QLOCAL(QNAME)
        DELETE QREMOTE(QRNAME)

        清除队列中的所有消息
        CLEAR QLOCAL(QNAME)

 


Procedure


  1. Log in as root, or switch to the superuser using the su
  2. If you are installing from the Server CD-ROM, insert the WebSphere MQ for Linux Server CD-ROM, and make the mount point your current directory.
  3. Run the mqlicense.sh If you want to view a text-only version of the license, which can be read by a screen-reader, type: ./mqlicense.sh -text_only The license is displayed. mqlicense.sh script with the -accept option.
    ./mqlicense.sh -accept
    You must accept the license agreement before you can proceed with the installation.
  4. Use the rpm -ivh The minimum components you must install are:
  • MQSeriesRuntime
  • MQSeriesServer
  • This example shows a minimum installation:

rpm -ivh MQSeriesRuntime-7.0.1-0.i386.rpm MQSeriesServer-7.0.1-0.i386.rpm

What to do next



Note: Ensure that /bin/sh is a valid shell interpreter compatible with the Bourne shell, otherwise the post-installation configuration of WebSphere MQ does not complete successfully.

/bin/sh

If the failure occurs, you can reinstall the /bin/sh shell using RPM, or specify the RPM option --nodeps


WebSphere MQ

This lists all of the installable MQ components and other IBM® products that comprise Websphere MQ.

When you install WebSphere® MQ for Linux®



Table 1. WebSphere MQ

Component

Description

Package

Server

Client (with SSL)

Runtime

Mandatory component. Needed for application development and provides support for external applications.

MQSeriesRuntime

X

X

Server

The server feature allows you to run queue managers on your computer and connect to other computers over a network. Provides messaging and queuing services to applications, and support for WebSphere MQ

MQSeriesServer

X

SDK

Required for compiling applications.

MQSeriesSDK

X

X

Client

The WebSphere MQ client is a small subset of WebSphere MQ, without a queue manager. Provides remote access to WebSphere MQ

MQSeriesClient

X

X

Sample programs

Sample application programs. Needed if you want to check your WebSphere MQ

MQSeriesSamples

X

X

Java™ messaging


The files needed for messaging using Java (includes Java Messaging Service).

MQSeriesJava

X

X

SSL support

Support for SSL key management

MQSeriesKeyman

X

X

IBM Java JRE (32-bit)


JRE Version 5 for Linux on Intel®, AMD64, i5/OS®, pSeries®, and zSeries®.

MQSeriesJRE

X

Brazilian Portuguese Message catalogs

Brazilian Portuguese message catalogs

MQSeriesMsg_pt

X

X

Czech Message catalogs

Czech message catalogs

MQSeriesMsg_cs

X

X

French Message catalogs

French message catalogs

MQSeriesMsg_fr

X

X

German Message catalogs

German message catalogs

MQSeriesMsg_de

X

X

Hungarian Message catalogs

Hungarian message catalogs

MQSeriesMsg_hu

X

X

Italian Message catalogs

Italian message catalogs

MQSeriesMsg_it

X

X

Japanese Message catalogs

Japanese message catalogs

MQSeriesMsg_ja

X

X

Korean Message catalogs

Korean message catalogs

MQSeriesMsg_ko

X

X

Polish Message catalogs

Polish message catalogs

MQSeriesMsg_pl

X

X

Russian Message catalogs

Russian message catalogs

MQSeriesMsg_ru

X

X

Spanish Message catalogs

Spanish message catalogs

MQSeriesMsg_es

X

X

Simplified Chinese Message catalogs

Simplified Chinese message catalogs

MQSeriesMsg_Zh_CN

X

X

Traditional Chinese Message catalogs

Traditional Chinese message catalogs

MQSeriesMsg_Zh_TW

X

X

Man pages

UNIX® man pages, in U.S. English, for the following:


  • Control commands
  • Message Queue Interface (MQI) commands
  • MQSC commands

MQSeriesMan

X

Extended Transactional Client

WebSphere MQ component that allows a client application, within the same unit of work:


  • To put messages to, and get messages from, queues that are owned by the queue manager to which it is connected.
  • To update the resources of a resource manager other than a WebSphere MQ

MQSeriesTXClient

X

WebSphere MQ

The WebSphere MQ Explorer allows you to administer and monitor WebSphere MQ

MQSeriesConfig

X

WebSphere Eclipse Platform (x86 platform & x86-64 platform only)

The WebSphere Eclipse Platform is a prerequisite for the WebSphere MQ

MQSeriesEclipseSDK33

X

WebSphere MQ

The File Transfer Application allows you to send and receive ordinary files in the form of WebSphere MQ

MQSeriesFTA

X



 

Table 2. Other products supplied with WebSphere MQ


Component

Description

File set

Server

Client

IBM Global Security Kit V7 Certificate and SSL Base Runtime - 32 bit

gsk7bas X X

IBM Global Security Kit V7 (POWER®, pSeries x86-64, zSeries s390x platforms only) Certificate and SSL Base Runtime - 64 bit. gsk7bas64 X X

 

Starting the WebSphere MQ


About this task



WebSphere® MQ Explorer, use the following command:

strmqcfg



This command is described in the Control Commands section of the WebSphere MQ . Use this command to ensure the WebSphere MQ

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  cxTyXg4sP4oA   2023年12月06日   26   0   0 ubuntuUbunturedisredis
  xaeiTka4h8LY   2024年04月26日   48   0   0 centoslinuxredis
nzOJE50ROQlt