阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

IBM MQ 7.5开发版安装配置

525次阅读
没有评论

共计 5558 个字符,预计需要花费 14 分钟才能阅读完成。

这里下载开发版

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

环境 CentOS 7.4 x64

1、安装前准备

[root@236 ~]# mkdir mq                                                                      #新建一个安装目录
[root@236 ~]# tar -xzf mqadv_dev75_linux_x86-64.tar.gz -C mq                                #解压
[root@236 ~]# 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

[root@236 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%]
 
 
[root@236 mq]# rpm -ivh MQSeriesSamples-7.5.0-2.x86_64.rpm                                                                                        ## 安装 MQ Samples
Preparing…                          ################################# [100%]
Updating / installing…
  1:MQSeriesSamples-7.5.0-2          ################################# [100%]
 
 
[root@236 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

[root@236 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

[root@236 mq]# yum install -y bc

第二次检查

IBM MQ 7.5 开发版安装配置

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

修改内核参数

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

[root@236 mq]# vim /etc/sysctl.conf

kernel.sem = 500 256000 250 1024

net.ipv4.tcp_keepalive_time = 300

fs.file-max = 524288

写入配置

[root@236 mq]# sysctl -p

第三次检查

IBM MQ 7.5 开发版安装配置

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

编辑 limit.conf

[root@236 mq]# vim /etc/security/limits.conf

添加两行

mqm              hard  nofile    10240
mqm              soft  nofile    10240

第四次检查通过

IBM MQ 7.5 开发版安装配置

修改环境变量

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

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

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

安装完成

2、启动实例

切换到 mqm 用户启动

[root@236 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

 

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计5558字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中

星哥玩云

星哥玩云
星哥玩云
分享互联网知识
用户数
4
文章数
19351
评论数
4
阅读量
7988306
文章搜索
热门文章
星哥带你玩飞牛NAS-6:抖音视频同步工具,视频下载自动下载保存

星哥带你玩飞牛NAS-6:抖音视频同步工具,视频下载自动下载保存

星哥带你玩飞牛 NAS-6:抖音视频同步工具,视频下载自动下载保存 前言 各位玩 NAS 的朋友好,我是星哥!...
星哥带你玩飞牛NAS-3:安装飞牛NAS后的很有必要的操作

星哥带你玩飞牛NAS-3:安装飞牛NAS后的很有必要的操作

星哥带你玩飞牛 NAS-3:安装飞牛 NAS 后的很有必要的操作 前言 如果你已经有了飞牛 NAS 系统,之前...
我把用了20年的360安全卫士卸载了

我把用了20年的360安全卫士卸载了

我把用了 20 年的 360 安全卫士卸载了 是的,正如标题你看到的。 原因 偷摸安装自家的软件 莫名其妙安装...
再见zabbix!轻量级自建服务器监控神器在Linux 的完整部署指南

再见zabbix!轻量级自建服务器监控神器在Linux 的完整部署指南

再见 zabbix!轻量级自建服务器监控神器在 Linux 的完整部署指南 在日常运维中,服务器监控是绕不开的...
飞牛NAS中安装Navidrome音乐文件中文标签乱码问题解决、安装FntermX终端

飞牛NAS中安装Navidrome音乐文件中文标签乱码问题解决、安装FntermX终端

飞牛 NAS 中安装 Navidrome 音乐文件中文标签乱码问题解决、安装 FntermX 终端 问题背景 ...
阿里云CDN
阿里云CDN-提高用户访问的响应速度和成功率
随机文章
三大开源投屏神器横评:QtScrcpy、scrcpy、escrcpy 谁才是跨平台控制 Android 的最优解?

三大开源投屏神器横评:QtScrcpy、scrcpy、escrcpy 谁才是跨平台控制 Android 的最优解?

  三大开源投屏神器横评:QtScrcpy、scrcpy、escrcpy 谁才是跨平台控制 Andr...
【开源神器】微信公众号内容单篇、批量下载软件

【开源神器】微信公众号内容单篇、批量下载软件

【开源神器】微信公众号内容单篇、批量下载软件 大家好,我是星哥,很多人都希望能高效地保存微信公众号的文章,用于...
支付宝、淘宝、闲鱼又双叕崩了,Cloudflare也瘫了连监控都挂,根因藏在哪?

支付宝、淘宝、闲鱼又双叕崩了,Cloudflare也瘫了连监控都挂,根因藏在哪?

支付宝、淘宝、闲鱼又双叕崩了,Cloudflare 也瘫了连监控都挂,根因藏在哪? 最近两天的互联网堪称“故障...
星哥带你玩飞牛NAS-7:手把手教你免费内网穿透-Cloudflare tunnel

星哥带你玩飞牛NAS-7:手把手教你免费内网穿透-Cloudflare tunnel

星哥带你玩飞牛 NAS-7:手把手教你免费内网穿透 -Cloudflare tunnel 前言 大家好,我是星...
亚马逊云崩完,微软云崩!当全球第二大云“摔了一跤”:Azure 宕机背后的配置风险与警示

亚马逊云崩完,微软云崩!当全球第二大云“摔了一跤”:Azure 宕机背后的配置风险与警示

亚马逊云崩完,微软云崩!当全球第二大云“摔了一跤”:Azure 宕机背后的配置风险与警示 首先来回顾一下 10...

免费图片视频管理工具让灵感库告别混乱

一言一句话
-「
手气不错
星哥带你玩飞牛NAS-11:咪咕视频订阅部署全攻略

星哥带你玩飞牛NAS-11:咪咕视频订阅部署全攻略

星哥带你玩飞牛 NAS-11:咪咕视频订阅部署全攻略 前言 在家庭影音系统里,NAS 不仅是存储中心,更是内容...
还在找免费服务器?无广告免费主机,新手也能轻松上手!

还在找免费服务器?无广告免费主机,新手也能轻松上手!

还在找免费服务器?无广告免费主机,新手也能轻松上手! 前言 对于个人开发者、建站新手或是想搭建测试站点的从业者...
星哥带你玩飞牛NAS硬件 01:捡垃圾的最爱双盘,暴风二期矿渣为何成不老神话?

星哥带你玩飞牛NAS硬件 01:捡垃圾的最爱双盘,暴风二期矿渣为何成不老神话?

星哥带你玩飞牛 NAS 硬件 01:捡垃圾的最爱双盘,暴风二期矿渣为何成不老神话? 前言 在选择 NAS 用预...
手把手教你,购买云服务器并且安装宝塔面板

手把手教你,购买云服务器并且安装宝塔面板

手把手教你,购买云服务器并且安装宝塔面板 前言 大家好,我是星哥。星哥发现很多新手刚接触服务器时,都会被“选购...
自己手撸一个AI智能体—跟创业大佬对话

自己手撸一个AI智能体—跟创业大佬对话

自己手撸一个 AI 智能体 — 跟创业大佬对话 前言 智能体(Agent)已经成为创业者和技术人绕...