IBMMQ在window与Linux环境搭建详细步骤

简介

IBM® MQ 是一款稳定、安全又可靠的消息传递中间件。它使用消息和队列来支持应用程序、系统、服务和文件之间的信息交换。它可以简化和加速多个平台中不同应用程序和业务数据的集成。支持各种 API 和语言,并可以在本地、云和混合云中部署。

Window下安装IBMMQ

下载地址:IBMMQ开发版下载可以选择window对应版本的安装包。
在这里插入图片描述

  1. 下载完成后双击安装包中setup.exe如下图所示:
    在这里插入图片描述
  2. 打开界面显示选中软件需求哪里,如果你是第一次安装则会提醒安装Web Sphere Eclipse,如下图所示:
    在这里插入图片描述
    MQ安装包里面有这个Eclipse安装包,路径在\CZJ3SML_7.0.1.3\Prereqs\IES ,其中setUp.exe就是这个WebSphere Eclipse版本,如下图所示:
    在这里插入图片描述
    安装好后,回到上一步操作步骤此刻就可以继续安装MQ了。
  3. 傻瓜式安装截图如下所示:
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

Linux下安装安装IBMMQ

  • 下载安装包
wget https://www14.software.ibm.com/cgi-bin/weblap/lap.pl?popup=Y&li_formnum=L-APIG-9BUHAE&accepted_url=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/mqadv_dev80_linux_x86-64.tar.gz
  • 解压安装包到指定目录下
tar -zxvf mqadv_dev80_linux_x86-64.tar.gz -C /service/

可以看到解压后在/service目录下出现了MQServer的文件夹,接下来就安装IBMMQ的各个组件吧。
在这里插入图片描述

  • 同意许可
[root@hadoop1 MQServer]# ./mqlicense.sh -accept

WARNING: Unable to determine distribution and release for this system.
         Check that it is supported before continuing with installation.
Licensed Materials - Property of IBM
 5724-H72
 (C) Copyright IBM Corporation 1994, 2015
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
Agreement accepted:  Proceed with install.
  • 安装MQSeriesRuntime
[root@hadoop1 MQServer]# rpm -ivh MQSeriesRuntime-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesRuntime-8.0.0-4          ################################# [100%]
  • 安装MQSeriesSamples
[root@hadoop1 MQServer]# rpm -ivh MQSeriesSamples-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesSamples-8.0.0-4          ################################# [100%]
  • 安装MQSeriesServer
[root@hadoop1 MQServer]# rpm -ivh MQSeriesServer-8.0.0-4.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:MQSeriesServer-8.0.0-4
################################# [100%]
Updated PAM configuration in /etc/pam.d/ibmmq
WARNING: System settings for this system do not meet recommendations for this product
         See the log file at "/tmp/mqconfig.12613.log" for more information

这里发现有警告日志的输出,我们不妨看一看日志内容,结果发现提升缺少bc环境。

[root@hadoop1 MQServer]# cat /tmp/mqconfig.12613.log
mqconfig: V3.7 analyzing CentOS Linux release 7.4.1708 (Core)  settings
          for WebSphere MQ V8.0
mqconfig: The bc program was not found on this system.  Please install bc
          and try running mqconfig again.
  • 安装bc
yum install -y bc

在此检查运行环境,日志里有一个mqconfig的命令,这个命令在目录/opt/mqm/bin/下。
在这里插入图片描述

  • 检查设置mq运行环境
解决file-max不足的问题,在/etc/sysctl.conf文件末尾添加下面配置
fs.file-max = 524288  
// 重启sysctl使配置生效
[root@hadoop1 bin]# sysctl -p 

在此运行mqconfig命令,file-max配置已经生效如下图所示:在这里插入图片描述
继续解决剩下两个问题

 vim /etc/security/limits.conf
 添加如下两行
*              hard  nofile    10240
*              soft  nofile    10240
// 重启机器使使配置生效
[root@hadoop1 bin]# shutdown -r now

再次检查环境
在这里插入图片描述
配置IBMMQ运行的环境变量

添加IBMMQ主目录
export IBMMQ_HOME=/opt/mqm
export PATH=$PATH:$IBMMQ_HOME/bin:$IBMMQ_HOME/samp/bin
source /etc/profile

IBMMQ默认会创建mqm用户以及mqm组,所有的操作都要在mqm用户下操作,否则则会报权限的问题,同时创建了以下几个目录/opt/mqm (安装目录)/var/mqm (数据目录)/var/mqm/log (日志目录)/var/mqm/errors(出错目录)

  • mqm用户和组的配置
// 配置mqm用户的密码,这里我设置的是mqm
passwd mqm 
// 切换mqm用户
su mqm

到这里软件安装结束,就可以很愉快进行IBMMQ开发了,下面将介绍IBMMQ的基本概念以及使用,详情请看这里不妨看一下这里:☞ IBMMQ配置和使用

  • 1
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值