Websphere MQ安装入门

环境:Red Hat Enterprise Linux Server release 6.4 (Santiago) 32bit

MQ版本:V7.5.0.2

[shell]

[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]# ./mqlicense.sh -accept

Licensed Materials - Property of IBM

5724-H72

(C) Copyright IBM Corporation 1994, 2013 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.

[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]# rpm -ivh MQSeriesRuntime-7.5.0-2.i386.rpm
Preparing… ########################################### [100%]
Creating group mqm
Creating user mqm
1:MQSeriesRuntime ########################################### [100%]
[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]# rpm -ivh MQSeriesS
MQSeriesSamples-7.5.0-2.i386.rpm MQSeriesServer-7.5.0-2.i386.rpm
MQSeriesSDK-7.5.0-2.i386.rpm
[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]# rpm -ivh MQSeriesServer-7.5.0-2.i386.rpm
Preparing… ########################################### [100%]
1:MQSeriesServer ########################################### [100%]

After the installation has completed, run the ‘/opt/mqm/bin/mqconfig’
command, using the ‘mqm’ user ID.

For example, execute the following statement when running as the ‘root’ user:

su mqm -c “/opt/mqm/bin/mqconfig”

The ‘mqconfig’ command validates that the system configuration satisfies the
requirements for WebSphere MQ, and ensures that the settings for the ‘mqm’
user ID are suitably configured. Other WebSphere MQ administrators in the
‘mqm’ group can run this command to ensure their user limits are also
properly configured to use WebSphere MQ.

If ‘mqconfig’ indicates that any of the requirements have not been met,
consult the installation section within the WebSphere MQ Information Center
for details about how to configure the system and user limits.

[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]# rpm -ivh MQSeriesSamples-7.5.0-2.i386.rpm
Preparing… ########################################### [100%]
1:MQSeriesSamples ########################################### [100%]
[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]# rpm -ivh MQSeriesMsg_ja-7.5.0-2.i386.rpm
Preparing… ########################################### [100%]
1:MQSeriesMsg_ja ########################################### [100%]
[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]# rpm -ivh MQSeriesMsg_Zh_CN-7.5.0-2.i386.rpm
Preparing… ########################################### [100%]
1:MQSeriesMsg_Zh_CN ########################################### [100%]
[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]# rpm -ivh MQSeriesSDK-7.5.0-2.i386.rpm
Preparing… ########################################### [100%]
1:MQSeriesSDK ########################################### [100%]
[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]# rpm -ivh MQSeriesJava-7.5.0-2.i386.rpm
Preparing… ########################################### [100%]
1:MQSeriesJava ########################################### [100%]
[root@localhost WS_MQ_LINUX_ON_X86_32B_V7.5.0.2]#

[root@localhost mqm]# su mqm -c “/opt/mqm/bin/mqconfig”
mqconfig: Analyzing Red Hat Enterprise Linux Server release 6.4 (Santiago)
settings for WebSphere MQ V7.5

System V Semaphores
semmsl (sem:1) 250 semaphores IBM>=500 FAIL
semmns (sem:2) 5 of 32000 semaphores (0%) IBM>=256000 FAIL
semopm (sem:3) 32 operations IBM>=250 FAIL
semmni (sem:4) 3 of 128 sets (2%) IBM>=1024 FAIL

System V Shared Memory
shmmax 4294967295 bytes IBM>=268435456 PASS
shmmni 1 of 4096 sets (0%) IBM>=4096 PASS
shmall 2019 of 268435456 pages (0%) IBM>=2097152 PASS

System Settings
file-max 8896 of 191597 files (4%) IBM>=524288 FAIL
tcp_keepalive_time 7200 seconds IBM<=300 FAIL

Current User Limits (mqm)
nofile (-Hn) 4096 files IBM>=10240 FAIL
nofile (-Sn) 1024 files IBM>=10240 FAIL
nproc (-Hu) 9 of 15033 processes (0%) IBM>=4096 PASS
nproc (-Su) 9 of 1024 processes (0%) IBM>=4096 FAIL

-bash-4.1$ pwd
/opt/mqm/bin
-bash-4.1$ ./strmqm QMGR01
AMQ8118: WebSphere MQ 队列管理器不存在。
-bash-4.1$ ./crtmqm QMGR01
WebSphere MQ 队列管理器已创建。
已创建目录“/var/mqm/qmgrs/QMGR01”。
队列管理器与安装“Installation1”关联。
正在创建或替换队列管理器“QMGR01”的缺省对象。
缺省对象统计:74 个已创建。0 个已替换。0 个已失败。
正在完成设置。
设置完成。
-bash-4.1$ ./strmqm QMGR01
WebSphere MQ 队列管理器“QMGR01”正在启动。
队列管理器与安装“Installation1”关联。
在日志重放阶段在队列管理器“QMGR01”上访问了 5 条日志记录。
完成队列管理器“QMGR01”的日志重放。
为队列管理器“QMGR01”恢复了事务管理器状态。
使用 V7.5.0.2 启动了 WebSphere MQ 队列管理器“QMGR01”。
-bash-4.1$

进入队列处理器

runmqsc CMS_ALARM_QM

创建通道

DEFINE CHANNEL (‘CH1’) CHLTYPE(SVRCONN) +
TRPTYPE(TCP) +
DESCR(‘ ‘) +
HBINT(300) +
MAXMSGL(4194304) +
MCAUSER(‘mqm’) +
RCVDATA(‘ ‘) +
RCVEXIT(‘ ‘) +
SCYDATA(‘ ‘) +
SCYEXIT(‘ ‘) +
SENDDATA(‘ ‘) +
SENDEXIT(‘ ‘) +
REPLACE

[/shell]