可参照文档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.
分享到:
相关推荐
4. **安装与配置**:在安装过程中,需要选择合适的安装类型,如开发环境或生产环境。配置包括定义队列管理器、创建消息队列、设置通道和网络通信参数等。对于试用版,可能有时间限制和功能限制,务必查看许可协议。 ...
在安装MQ之前,需要满足以下硬件和软件要求: 1. **硬件环境**:至少需要一台基于32位Intel处理器的IBM PC兼容机,支持SNA LU 6.2、TCP/IP、NetBIOS或SPX的通信硬件。基本安装需要85MB磁盘空间,运行时至少20MB内存...
在概述部分,白皮书介绍了 IBM WebSphere MQ 的需求背景和技术方案。IBM WebSphere MQ 是一种基于消息队列的中间件产品,可以满足企业的集成需求。该产品具有高效、可靠、灵活和安全等特点,可以帮助企业实现业务...
IBM WebSphere MQ入门教程 IBM WebSphere MQ 是一种基于消息队列的中间件,用于实现不同的应用程序之间的异步通信。下面是对 IBM WebSphere MQ 的入门教程的总结,涵盖了 WebSphere MQ 的原理、体系结构、重要特点...
"IBM WebSphere MQ V7 jar" 指的是版本7的WebSphere MQ对应的Java API库。 在描述中提到的“java连接MQ操作Queue数据所需jar”,意味着开发人员在编写Java程序来连接和操作IBM WebSphere MQ的队列时,需要引入这些...
综上所述,《Websphere MQ入门教程7》不仅涵盖了WebSphere MQ的基本概念,还提供了丰富的实践指导,对于想要掌握这一消息中间件的读者来说,是一份宝贵的资源。通过阅读此书,读者可以系统地学习并逐步精通WebSphere...
本文将介绍如何在 Linux 上安装和配置 WebSphere MQ,以及如何使用 Java 应用程序开发 MQ 环境。本文将通过示例应用程序说明如何向队列发送消息和从队列接收消息。 WebSphere MQ 简介 WebSphere MQ 是一种可靠的...
IBM WebSphere MQ 8.0 linux 安装包 part1
7. 安装`rpm`包管理器:在Ubuntu上,使用`apt-get`命令安装`rpm`,以便处理WebSphere MQ的RPM包。 8. 授权WebSphere MQ:进入解压后的WebSphere MQ目录,运行`./mqlicense.sh -text_only`,阅读并接受许可协议。 9...
WebSphere MQ 8.0 自带的 JAR 包是一组关键组件,它们构成了 IBM 的消息中间件解决方案,用于在不同应用程序之间可靠地传递数据。这些 JAR 文件位于 `WebSphere MQ\java\lib` 目录下,是开发、配置和运行与 ...
在安装WebSphere MQ前,首先要获取到安装介质。这可以通过两种方式进行:一是使用`mount`命令挂载物理光盘或网络共享;二是通过FTP下载。如描述所示,这里使用FTP方式从10.1.9.120服务器下载MQINST.tar文件。登录FTP...
本教程的详细内容可参考附件中的“WebSphere MQ入门教程7.doc”,该文档将深入讲解上述知识点,并包含实例代码和配置步骤,是学习和理解WebSphere MQ的良好参考资料。在实际应用中,读者需结合自身业务场景,灵活...
6. **交易支持**:WebSphere MQ支持X/Open分布式事务处理(DTP),确保消息在事务中的正确处理。 **MQ电子书的学习价值** 学习MQ和WebSphere MQ的相关书籍可以帮助我们深入理解以下关键概念: 1. **消息队列模型*...
IBM WebSphere MQ,通常简称为MQ,是IBM提供的一款企业级的消息中间件产品。它允许应用程序之间通过异步消息传递来通信,无论这些应用程序是在同一台计算机上还是在不同的网络环境中。这种通信方式增强了系统的可...
总结来说,WebSphere MQ为开发者提供了一个强大的消息传输平台,它不仅在性能上有所提升,而且在用户体验、系统可靠性和配置的便捷性上都有显著的改进。无论是用于企业内部应用之间的消息交换,还是与外部系统集成,...
通过以上步骤,您可以顺利完成 WebSphere MQ 7.1 在 Windows 2003 系统上的安装与基本配置,并能够进行简单的消息传递测试。这对于理解 WebSphere MQ 的工作原理及其在不同操作系统平台上的部署和配置非常有帮助。
WebSphere MQ .NET API支持SSL加密,确保在网络上传输的消息的安全性。启用SSL需要正确的证书管理和密钥配置,这对于防止数据泄露和中间人攻击至关重要。 **使用.NET Monitor**是监控和管理WebSphere MQ .NET应用...
WebSphere® MQ (也称MQSeries)以一致的、可靠的和易于管理的方式来连接应用程序,并为跨部门、企业范围的集成提供了可靠的基础。通过为重要的消息和事务提供可靠的、一次且仅一次的传递,Websphere MQ 可以处理...