IBM MQ 安装部署

文章目录
  1. 安装前准备

  2. IBM MQ 手册:https://www.ibm.com/support/knowledgecenter/zh/SSFKSJ_9.1.0
    IBM MQ 试用:https://www.ibm.com/products/mq
    IBM MQ 命令:IBM MQ control commands reference

    #---安装必要组件---
    [root@CentOS ~]# yum -y install bc rpm-build

    #---配置内核参数---
    [root@CentOS ~]# echo "fs.file-max = 524288" >>/etc/sysctl.conf
    [root@CentOS ~]# echo "kernel.threads-max = 32768" >>/etc/sysctl.conf
    [root@CentOS ~]# sysctl -p /etc/sysctl.conf

    #---更改 limits 值---
    [root@CentOS ~]# echo "mqm hard nofile 10240" >>/etc/security/limits.conf
    [root@CentOS ~]# echo "mqm soft nofile 10240" >>/etc/security/limits.conf
    [root@CentOS ~]# echo "mqm hard nproc 4096" >>/etc/security/limits.conf
    [root@CentOS ~]# echo "mqm soft nproc 4096" >>/etc/security/limits.conf

  3. IBM MQ 安装

  4. [root@CentOS ~]# tar zxvf IBM_MQ_9.1_LINUX_X86-64_TRIAL.tar.gz
    [root@CentOS ~]# cd MQServer && ./mqlicense.sh -accept
    [root@CentOS MQServer]# rpm --prefix /opt/mqm -ivh MQSeriesRuntime-9.1.0-0.x86_64.rpm \
    MQSeriesSamples-9.1.0-0.x86_64.rpm \
    MQSeriesJRE-9.1.0-0.x86_64.rpm \
    MQSeriesJava-9.1.0-0.x86_64.rpm \
    MQSeriesServer-9.1.0-0.x86_64.rpm \
    MQSeriesClient-9.1.0-0.x86_64.rpm \
    MQSeriesExplorer-9.1.0-0.x86_64.rpm

    #---配置环境变量---
    [root@CentOS MQServer]# echo "PATH=$PATH:/opt/mqm/bin" >>/etc/profile

  5. 验证安装

  6. [root@CentOS ~]# id mqm && echo "passw0rd" | passwd --stdin mqm
    [root@CentOS ~]# su - mqm
    -bash-4.2$ /opt/mqm/bin/mqconfig
    -bash-4.2$ . /opt/mqm/bin/setmqenv -s
    -bash-4.2$ dspmqver

    #---安装正式版License---
    -bash-4.2$ /opt/mqm/bin/setmqprd ~/licenses/amqpcert.lic

  7. 队列管理器

  8. 创建队列管理器:crtmqm QMA
    启动队列管理器:strmqm QMA
    运行 MQSC 命令:runmqsc QMA

    显示队列管理器:dspmq

    停止队列管理器:endmqm QMA
    删除队列管理器:dltmqm QMA

  9. 脚本调用 MQSC 命令

发表评论

电子邮件地址不会被公开。 必填项已用*标注