可参照文档http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amq1ac.doc/lq10120_.htm
和http://blog.csdn.net/lang_ysh/archive/2010/03/18/5391971.aspx
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
-
Log in as root, or switch to the superuser using the su
command.
-
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.
-
Run the mqlicense.sh
script.
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.
If want to accept the license without it being
displayed, you can run the
mqlicense.sh
script with
the
-accept
option.
./mqlicense.sh -accept
You
must accept the license agreement before you can proceed with the
installation.
-
Use the rpm -ivh
command to install
each component that you require.
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.
If your Linux machine was not installed with RPM, you
might see a prerequisites failure of /bin/sh
when
you try to install WebSphere MQ.
The failure is because the RPM tables do not recognize that a valid
shell interpreter is installed.
If the failure occurs, you can
reinstall the /bin/sh
shell using RPM, or specify
the RPM option --nodeps
to disable dependency checking
during installation of WebSphere MQ.
WebSphere MQ
Components
This lists all of the installable MQ components and other IBM® products that comprise Websphere
MQ.
When you install WebSphere® MQ
for Linux®
,
you can choose which components to install.
Table 1. WebSphere MQ
components and packages
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
client connections. |
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
. Must be connected to a
server. To install a client on the same machine as a server, use the
Server CD-ROM; otherwise use the Clients CD-ROM. |
MQSeriesClient |
X |
X |
Sample programs
|
Sample application programs. Needed if you want
to check your WebSphere MQ
installation
using the verification procedures. |
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
queue manager.
|
MQSeriesTXClient |
X |
|
WebSphere MQ
Explorer
(x86 platform & x86-64 platform only)
|
The WebSphere MQ
Explorer
allows you to administer and monitor WebSphere MQ
resources. |
MQSeriesConfig |
X |
|
WebSphere Eclipse
Platform (x86 platform & x86-64 platform only)
|
The WebSphere Eclipse
Platform is a prerequisite for the WebSphere MQ
Explorer and WebSphere MQ File Transfer Application
components. |
MQSeriesEclipseSDK33
|
X |
|
WebSphere MQ
File
Transfer Application (x86 platform only)
|
The File Transfer Application allows you to
send and receive ordinary files in the form of WebSphere MQ
messages. You can use the
File Transfer Application to send and receive any type of file in
any format, for example: ASCII Linux format
(with line feed characters), ASCII file Windows® format (with carriage return/line
feed characters), binary (for example, image files, wordprocessor
files, spreadsheet files, or compressed files), also reports, letters,
memos and charts. The File Transfer Application has both a graphical
user interface and a command line interface. |
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
Explorer
About this task
To start the
WebSphere® MQ
Explorer,
use the following command:
strmqcfg
This
command is described in the Control Commands section of the WebSphere MQ
System Administration Guide
.
Use this command to ensure the WebSphere MQ
Explorer
launches correctly.
分享到:
相关推荐
第二部分 WebSphere MQ系统管理,分为六章,分别介绍安装、配置、管理、控制命令和问题确定;第三部分 WebSphere MQ应用开发,由五章组成,介绍程序设计、编写和例子程序。 本书是WebSphere MQ产品的实用指南,...
本人自学IBM的WebSphereMQ自学笔记,内有MQ安装文档,建MQ的例子等。 1、 MQ6.0安装 2 1.1 启动MQ v6.0 安装程序 2 1.2 软件需求检查 2 1.3 WebSphere Eclipse Platform V3.0.1软件安装 2 1.4 网络配置检查 3 1.5 ...
IBM WebSphere MQ是IBM业界领先面向消息的中间件产品,也是MQ系列产品的基础和核心,它使不同的应用程序能够以企业级的性能,在广泛的平台上安全而可靠地通讯。
IBM Websphere mq安装IBM Websphere mq安装
第三章WebSphere MQ系统安装 43 目标 43 3.1 规划安装 43 3.1.1 硬件要求 43 3.1.2 软件要求 44 3.2 安装 WebSphere MQ 46 3.2.1 WebSphere MQ 文档 46 3.2.2 WebSphere MQ安装 47 3.3 验证安装 49 3.3.1安装验证 49...
WebSphere MQ 7.0nd 64bit 安装情况总结
WebSphere MQ 开发培训 IBM软件部 软件部 WebSphere MQ 议程 WebSphere MQ 概览 WebSphere MQ 安装配置 WebSphere MQ 应用开发 WebSphere MQ 参考
WebSphere® MQ (也称MQSeries)以一致的、可靠的和易于管理的方式来连接应用程序,并为跨部门、企业范围的集成提供了可靠的基础。通过为重要的消息和事务提供可靠的、一次且仅一次的传递,Websphere MQ 可以处理...
Websphere MQ Programming Guide,Websphere MQ Using C++,WebSphere MQ Using Java,WEBSPHERE MQ6.0 JAVA编程,WebSphere MQ基础教程,IBM WEBSPHERE MQ教程,精通WebSphere MQ,WebSphere MQ开发快速入门,IBM ...
本文档介绍了websphere MQ在linux系统下的安装,详解
IBM WebSphere MQ 6.0 现场安装手册,WORD文档!
IBM WebSphere MQ 技术白皮书.doc
WebSphere MQ WebSphere MQWebSphere MQ WebSphere MQ
WebSphereMQ7.1 windowns 安装和测试
IBM WebSphere MQ安装使用教程详细图解,根据本教程您可以迅速使用mq,不要犹豫了,快点下载吧
WebSphere_MQ_V7.0.1.3 安装目录下\java\doc;\java\lib;\java\lib64. 包含com.ibm.mq.jar,com.ibm.mq.jmqi.jar,com.ibm.mq.axis2.jar,com.ibm.mq.commonservices.jar等等
IBM Websphere MQ 教程之备份与恢复
WebSphere® MQ (也称MQSeries)以一致的、可靠的和易于管理的方式来连接应用程序,并为跨部门、企业范围的集成提供了可靠的基础。通过为重要的消息和事务提供可靠的、一次且仅一次的传递,Websphere MQ 可以处理...
IBM WebSphere MQ版本v7的开发者使用简介,有助于初学者了解MQ的知识。