IBM MQ 7.5开发版安装配置

下载地址:https://www.ibm.com/developerworks/cn/downloads/ws/wmq/

这里下载开发版

环境Centos7.4 x64

1、安装前准备

[[email protected] ~]# mkdir mq                                                                      #新建一个安装目录
[[email protected] ~]# tar -xzf mqadv_dev75_linux_x86-64.tar.gz -C mq                                #解压
[[email protected] ~]# ls mq
copyright                            MQSeriesFTAgent-7.5.0-2.x86_64.rpm    MQSeriesMan-7.5.0-2.x86_64.rpm     MQSeriesMsg_ko-7.5.0-2.x86_64.rpm     MQSeriesSDK-7.5.0-2.x86_64.rpm
crtmqpkg                             MQSeriesFTBase-7.5.0-2.x86_64.rpm     MQSeriesMsg_cs-7.5.0-2.x86_64.rpm  MQSeriesMsg_pl-7.5.0-2.x86_64.rpm     MQSeriesServer-7.5.0-2.x86_64.rpm
lap                                  MQSeriesFTLogger-7.5.0-2.x86_64.rpm   MQSeriesMsg_de-7.5.0-2.x86_64.rpm  MQSeriesMsg_pt-7.5.0-2.x86_64.rpm     MQSeriesXRClients-7.5.0-2.x86_64.rpm
licenses                             MQSeriesFTService-7.5.0-2.x86_64.rpm  MQSeriesMsg_es-7.5.0-2.x86_64.rpm  MQSeriesMsg_ru-7.5.0-2.x86_64.rpm     MQSeriesXRService-7.5.0-2.x86_64.rpm
mqlicense.sh                         MQSeriesFTTools-7.5.0-2.x86_64.rpm    MQSeriesMsg_fr-7.5.0-2.x86_64.rpm  MQSeriesMsg_Zh_CN-7.5.0-2.x86_64.rpm  PreReqs
MQSeriesAMS-7.5.0-2.x86_64.rpm       MQSeriesGSKit-7.5.0-2.x86_64.rpm      MQSeriesMsg_hu-7.5.0-2.x86_64.rpm  MQSeriesMsg_Zh_TW-7.5.0-2.x86_64.rpm  READMEs
MQSeriesClient-7.5.0-2.x86_64.rpm    MQSeriesJava-7.5.0-2.x86_64.rpm       MQSeriesMsg_it-7.5.0-2.x86_64.rpm  MQSeriesRuntime-7.5.0-2.x86_64.rpm    repackage
MQSeriesExplorer-7.5.0-2.x86_64.rpm  MQSeriesJRE-7.5.0-2.x86_64.rpm        MQSeriesMsg_ja-7.5.0-2.x86_64.rpm  MQSeriesSamples-7.5.0-2.x86_64.rpm

运行许可,选择1同意

./mqlicense.sh

安装MQ Server

[[email protected] mq]# rpm -ivh MQSeriesRuntime-7.5.0-2.x86_64.rpm                                                                 #安装MQ Runtime
Preparing...                          ################################# [100%]
Creating group mqm
Creating user mqm
Updating / installing...
   1:MQSeriesRuntime-7.5.0-2          ################################# [100%]
   
   
[[email protected] mq]# rpm -ivh MQSeriesSamples-7.5.0-2.x86_64.rpm                                                                                         ##安装MQ Samples
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesSamples-7.5.0-2          ################################# [100%]
   
   
[[email protected] mq]# rpm -ivh MQSeriesServer-7.5.0-2.x86_64.rpm                                                                     #安装MQ server
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesServer-7.5.0-2           ################################# [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.

然后根据提示,执行命令去检查环境是否允许

第一次检查,提示缺少bc

[[email protected] mq]# su mqm -c "/opt/mqm/bin/mqconfig"
mqconfig: Analyzing CentOS Linux release 7.4.1708 (Core)  settings for
          WebSphere MQ V7.5
mqconfig: The bc program was not found on this system.  Please install bc
          and try running mqconfig again.

安装bc

[[email protected] mq]# yum install -y bc

第二次检查

有几个fail的需要解决,参考文档:https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.ins.doc/q008550_.htm

修改内核参数

编辑/sysctl.conf ,添加下列配置

[[email protected] mq]# vim /etc/sysctl.conf

kernel.sem = 500 256000 250 1024

net.ipv4.tcp_keepalive_time = 300

fs.file-max = 524288


写入配置

[[email protected] mq]# sysctl -p

第三次检查

还剩2个文件相关的需要解决

编辑limit.conf

[[email protected] mq]# vim /etc/security/limits.conf

添加两行

mqm              hard  nofile     10240
mqm              soft  nofile     10240

第四次检查通过

修改环境变量

由于mq默认安装在/opt/mqm目录,所以安装完成后会找不到mq相关命令,需要配置环境变量才能找到

vim /etc/profile     #添加下面一行

PATH=/opt/mqm/bin:/opt/mqm/samp/bin/:$PATH

安装完成

2、启动实例

切换到mqm用户启动

[[email protected] mq]# su mqm
bash-4.2$

创建默认实例

bash-4.2$ crtmqm -q oe
WebSphere MQ queue manager created.
Directory '/var/mqm/qmgrs/oe' created.
The queue manager is associated with installation 'Installation1'.
Creating or replacing default objects for queue manager 'oe'.
Default objects statistics : 74 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.

查看实例,这里状态是ended的

bash-4.2$ dspmq
QMNAME(oe)                                                STATUS(Ended immediately)

启动实例

bash-4.2$ strmqm oe
WebSphere MQ queue manager 'oe' starting.
The queue manager is associated with installation 'Installation1'.
5 log records accessed on queue manager 'oe' during the log replay phase.
Log replay for queue manager 'oe' complete.
Transaction manager state recovered for queue manager 'oe'.
WebSphere MQ queue manager 'oe' started using V7.5.0.2.

创建队列一个名为test的队列

bash-4.2$ runmqsc oe                                                    #进入队列
5724-H72 (C) Copyright IBM Corp. 1994, 2011.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager oe.

define qlocal(test)                                                        #定义队列test
     1 : define qlocal(test)
AMQ8006: WebSphere MQ queue created.
end
     2 : end                                                        #退出
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.

发送消息测试,报错2085

bash-4.2$ amqsput Test oe
Sample AMQSPUT0 start
target queue is Test
MQOPEN ended with reason code 2085
unable to open queue for output
Sample AMQSPUT0 end

后来查找问题发现这个队列不能为小写的,test队列被转换成大写的了,建议队列名设置为大写的,重新发送消息测试,连续敲两下回车表示输入完成

bash-4.2$ amqsput TEST oe
Sample AMQSPUT0 start
target queue is TEST
hello world!

Sample AMQSPUT0 end

接收消息,接受成功

bash-4.2$ amqsget TEST oe
Sample AMQSGET0 start
message <hello world!>

启动端口监听

bash-4.2$ runmqlsr -t tcp -p 2424 -m oe &
[1] 5067
bash-4.2$ 5724-H72 (C) Copyright IBM Corp. 1994, 2011.  ALL RIGHTS RESERVED.

启动成功

bash-4.2$ netstat -tpln | grep 2424
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::2424                 :::*                    LISTEN      5067/runmqlsr

原文地址:http://blog.51cto.com/niubdada/2057674

时间: 2024-07-30 20:05:16

IBM MQ 7.5开发版安装配置的相关文章

weblogic开发版安装

看到weblogic开发版安装的十几篇博客内容完全一样非常头疼,决定按自己想法走一遍 还有,安装weblogic需要的java_home中的路径不能有空格,单词中间不能有空格!!! 下载开发版 可以直接百度,这里我选择第二个进去 选择下载条件如下,其实安装教程在下面的readme里面已经说的很清楚了,我写安装教程只是把我遇到的坑说一说 配置环境变量如下,变量值为你解压的地址,如下 然后命令行切到你刚才文件解压路径下或者你自己的"MV_HOME" 输入: configure.cmd, 如

CentOS 6.6 MySQL 5.5.32 绿色版安装配置

MySQL 5.5.32 绿色版安装配置 基本信息 系统版本:CentOS 6.6 MySQL版本:5.5.32 绿色版 初始化MySQL,出现黄色部分两个OK,表示初始化正确 [[email protected] tools]# useradd -s/sbin/nologin -M mysql [[email protected] tools]# tar zxvfmysql-5.5.32-linux2.6-x86_64.tar.gz [[email protected] tools]# mvm

Mysql免安装版安装配置及常用操作

作为关系型数据库的一种,mysql因其占用内存小和开源等特性而兴起.下面简单介绍下关于mysql配置和简单的操作. mysql配置 1.安装文件的下载 免安装版 下载地址 :http://dev.mysql.com/downloads/file.php?id=452189 下载后是一个压缩文件,解压后放在你想放的位置就可以了.建议还是靠近根目录比较好. 2.配置环境变量 2.1新建一个mysqlhome或者什么的都可以.值为上一步的解压缩目录 2.2将mysqlhome放在Path目录就好了 这

Ueditor .net版安装配置打开项目的源码傻瓜版教程 亲測~

环境要求: 没有 .NET Framework 4.0的要先安装 安装完 .NET Framework 4.0 后.还须要向 IIS 注冊应用程序池,注冊的方法是,使用管理员权限打开命令提示符(CMD),输入下面命令: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i 安装完成后,在 IIS 管理器刷新就能看到 4.0 的应用程序池. Ueditor .net版安装配置打开项目的教程: 1.在http://ueditor

mysql5.6.27压缩版安装配置指南【个人总结】

mysql5.6.27压缩版安装配置指南[个人总结] 1..下载准备压缩包 360云盘下载地址: https://yunpan.cn/cPKyugkUcDEmP  访问密码 375b 2.解压缩,将压缩版解压到D盘 D:\mysql-5.6.27-winx64 3.修改配置文件 my-default.ini #my-default.ini文件的编码必须是英文编码(如windows中的ANSI),不能是UTF-8或GBK等 # For advice on how to change setting

Ueditor .net版安装配置打开项目的源代码傻瓜版教程 亲测~

环境要求: 没有 .NET Framework 4.0的要先安装 安装完 .NET Framework 4.0 后,还需要向 IIS 注册应用程序池,注册的方法是,使用管理员权限打开命令提示符(CMD),输入以下命令: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i 安装完毕后,在 IIS 管理器刷新就能看到 4.0 的应用程序池. Ueditor .net版安装配置打开项目的教程: 1.在http://ueditor

MySQL压缩版安装配置教程

MySQL压缩版安装配置教程 1.下载 在官网下载压缩包(这里我下载的是第二个) 下载地址:https://dev.mysql.com/downloads/mysql/5.7.html#downloads 2.安装与配置 1.将压缩包解压到任意目录 2.如上图,在该目录下创建一个data空文件夹,再建一个my.ini的配置文件,在该文件中写入以下代码: 注意:以下代码的注释是必须删除的,也就是#号及其后面的中文必须都删掉,还有就是下面的basedir和datadir要改成自己相应的目录 [mys

Win10系统下MySQL压缩版安装配置教程

MySQL分为安装版和压缩.为了以后MySQL出问题想重装时的各种不必要的麻烦,我个人推荐压缩版MySQL.下面进入教程: 进入官网下载MySQL压缩包,并解压如下 配置环境变量---将bin文件的目录加入电脑系统环境配置path下 新建my.ini配置文件(安装目录和数据库存放目录根据自己的目录编辑) [mysql] default-character-set = utf8 [mysqld] #端口 port = 3306 #mysql安装目录 basedir = E:/mysql-8.0.1

MySQL解压版安装配置详解

MySQL解压版安装起来比较简单,步骤相对较少.下面我们就来详细介绍一下如何在windows操作系统上安装解压班的MySQL. 1.下载解压版MySQL,地址:http://downloads.mysql.com/archives/community/ 2.解压到本地某个目录,例如我解压到了 E:\mySoftWare\mysql 目录下 截图是我修改过的 跟刚刚解压之后的会有所不同,先不用在意. 3.配置环境变量: 右键我的电脑->属性->更改设置->高级->环境变量->系