IBMmq 9.0 - 二进制部署
安装必要组件
yum -y install bc rpm-build
配置内核参数
echo "fs.file-max = 524288" >>/etc/sysctl.conf
echo "kernel.threads-max = 32768" >>/etc/sysctl.conf
sysctl -p /etc/sysctl.conf
更改 limits 值
echo "mqm hard nofile 10240" >>/etc/security/limits.conf
echo "mqm soft nofile 10240" >>/etc/security/limits.conf
echo "mqm hard nproc 4096" >>/etc/security/limits.conf
echo "mqm soft nproc 4096" >>/etc/security/limits.conf
安装IBM MQ
上传安装压缩包IBM_MQ_9.0.5.0_LINUX_X86-64.tar.gz
到/usr/local/src
tar -zxvf IBM_MQ_9.0.5.0_LINUX_X86-64.tar.gz
cd MQServer/
mkdir /opt/mqm
useradd mqm
./mqlicense.sh -accept
rpm -ivh *.rpm
#检查系统设置是否满足MQ的安装要求
su mqm -c /opt/mqm/bin/mqconfig
==========================================================
mqconfig: Analyzing CentOS Linux release 7.9.2009 (Core) settings for IBM
MQ V9.0
System V Semaphores
semmsl (sem:1) 250 semaphores IBM>=32 PASS
semmns (sem:2) 0 of 32000 semaphores (0%) IBM>=4096 PASS
semopm (sem:3) 32 operations IBM>=32 PASS
semmni (sem:4) 0 of 128 sets (0%) IBM>=128 PASS
System V Shared Memory
shmmax 18446744073692774399 bytes IBM>=268435456 PASS
shmmni 2 of 4096 sets (0%) IBM>=4096 PASS
shmall 524 of 18446744073692774399 pages (0%) IBM>=2097152 PASS
System Settings
file-max 5408 of 524288 files (1%) IBM>=524288 PASS
pid_max 420 of 32768 processids (1%) IBM>=32768 PASS
threads-max 420 of 32768 threads (1%) IBM>=32768 PASS
Current User Limits (mqm)
nofile (-Hn) 10240 files IBM>=10240 PASS
nofile (-Sn) 10240 files IBM>=10240 PASS
nproc (-Hu) 9 of 4096 processes (0%) IBM>=4096 PASS
nproc (-Su) 9 of 4096 processes (0%) IBM>=4096 PASS
mqconfig: Any values listed in the "Current User Limits" section are resource
limits for the user who ran mqconfig.
If the user account that is used to invoke this script (mqm)
is not the same as the user account that is used to start the
queue manager, then the assessed values will not be accurate.
If you normally start your queue managers as the mqm user, you
should switch to mqm and run mqconfig there.
If other members of the mqm group also start queue managers, all
those members should run mqconfig, to ensure that their limits
are suitable for IBM MQ.
mqconfig: A PASS score means your system meets the minimum IBM
recommendations but busy systems might need higher limits to run
production workloads.
For performance-critical environments, further performance testing
should always be conducted using workloads that are representative
of the real volume.
==========================================================
配置环境变量
echo "PATH=$PATH:/opt/mqm/bin" >>/etc/profile
验证安装
注意MQ管理命令必须是属于mqm组的用户才有权限执行,默认创建了mqm用户
su - mqm
#设置变量,以便使用各种MQ管理命令
/opt/mqm/bin/setmqenv -s
[mqm@localhost ~]$ dspmqver
Name: IBM MQ
Version: 9.0.5.0
Level: p905-L180305.1
BuildType: IKAP - (Production)
Platform: IBM MQ for Linux (x86-64 platform)
Mode: 64-bit
O/S: Linux 3.10.0-1160.el7.x86_64
InstName: Installation1
InstDesc:
Primary: No
InstPath: /opt/mqm
DataPath: /var/mqm
MaxCmdLevel: 905
LicenseType: Production