LINUX 下MQ V7.1的安装和配置 及双机搭建

发布时间:2013-09-23 17:25:06   来源:文档文库   
字号:

LINUX 下MQ V7.1的安装和配置 及双机搭建

1:check 操作系统是否支持 MQ V7.1

64Linux:

操作系统检测:

必须安装gcc编译器(最好是操作系统安装以development的模式进行安装)。

Shell interpreter
Ensure that /bin/sh is a valid shell interpreter compatible with the Bourne shell, otherwise the post-installation configuration of WebSphere MQ does not complete successfully. If the shell was not installed with RPM, you might see a prerequisites failure of /bin/sh when you try to install WebSphere MQ. The failure is because the RPM tables do not recognize that a valid shell interpreter is installed. If the failure occurs, you can reinstall the /bin/sh shell using RPM, or specify the RPM option --nodeps to disable dependency checking during installation of WebSphere MQ.
Kernel configuration
WebSphere MQ uses System V IPC resources, in particular shared memory and semaphores.
The minimum configuration for WebSphere MQ for these resources is as follows:

kernel.msgmni = 1024

kernel.shmmni = 4096

kernel.shmall = 2097152

kernel.shmmax = 268435456

kernel.sem = 500 256000 250 1024

fs.file-max = 524288

net.ipv4.tcp_keepalive_time = 300

If you plan to run more than one queue manager of moderate size on the server, increase fs.file-max.
To view the kernel parameters for your system, enter the following commands:

cat /proc/sys/kernel/msgmni

cat /proc/sys/kernel/shmmni

cat /proc/sys/kernel/shmall

cat /proc/sys/kernel/shmmax

cat /proc/sys/kernel/sem

cat /proc/sys/fs/file-max

cat /proc/sys/net/ipv4/tcp_keepalive_time

Each of these commands returns the value of the corresponding kernel parameter. For example, cat /proc/sys/kernel/msgmni returns the value for kernel.msgmni. If any of the values is less than the minimum value, you need to increase it to at least the minimum value.
To add or alter these values, log on as a user with root authority. Open the file /etc/sysctl.conf with a text editor, then add or change the following entries to the values shown:
kernel.msgmni = 1024
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 268435456
kernel.sem = 500 256000 250 1024
fs.file-max = 524288
net.ipv4.tcp_keepalive_time = 300
Then save and close the file.
To load these sysctl values immediately, enter the command:
sysctl -p
If you do not issue the sysctl -p command, the new values are loaded when the system is rebooted

以上是在Linux上安装MQ所必须的!

一般在Linux上做MQ的双机需要安装Veritas Cluster Server或者Red Hat Enterprise Linux cluster with Red Hat Cluster Suite.

2.磁盘共享:

数据文件目录 /MQHA/ZJPORT_QM/data

日志文件目录 /MQHA/ZJPORT_QM/log

3.安装步骤:

1. 取得安装包

#tar -zxvf    MQ_6.0_Linux_x86-64.tar.gz

2. 创造MQ用户和用户组

#groupadd -f -g 1300 mqm

#useradd -u 1311 mqm -d /home/mqm -g mqm

#passwd mqm

3.安装

./mqlicense.sh –accept

rpm -ivh MQSeriesRuntime-7.1.0-0.x86_64.rpm MQSeriesServer-7.1.0-0.x86_64.rpm MQSeriesJava-7.1.0-0.x86_64.rpm MQSeriesSDK-7.1.0-0.x86_64.rpm MQSeriesJRE-7.1.0-0.x86_64.rpm MQSeriesMan-7.1.0-0.x86_64.rpm MQSeriesGSKit-7.1.0-0.x86_64.rpm

/opt/mqm/bin/setmqinst -i -p /opt/mqm

4.安装校验

rpm -qa | grep MQSeries

到这里MQ就已经安装完成了

4.队列管理创建

$crtmqm -md /MQHA/ZJPORT_QM/data -ld /MQHA/ZJPORT_QM/log ZJPORT_QM

--查看队列状态

$dspmq

--手动启动队列管理器

$strmqm

--停止队列管理器

$endmqm

--显示可在后面任务中使用的addmqinf命令

dspmqinf –o command ZJPORT_QM

--所显示的 addmqinf 命令将类似于下列示例

1. addmqinf –sQueueManager –vName=qmgrname –vDirectory=qmgrname \

–vPrefix=/var/mqm –vDataPath=/MQHA/qmgrname/data/qmgrname

5.将队列管理器配置信息添加到高可用性 (HA) 集群中的其他节点

1. 安装队列管理器的文件系统。

2. 可以通过直接编辑 /var/mqs.ini 或发出 addmqinf 命令(通过在创建用于高可用性 (HA) 集群中的队列管理器中的步骤 6 和步骤 7 中的 dspmqinf 命令显示)将队列管理器配置信息添加到节点中。

3. 启动和停止队列管理器以验证配置。

4. 卸下队列管理器的文件系统。

6.从高可用性 (HA) 集群节点删除队列管理器

1. HA 集群除去节点,以便 HA 集群将不再尝试激活此节点上的队列管理器。

2. 使用下列 rmvmqinf 命令除去队列管理器的配置信息:

rmvmqinf qmgrname

要完全删除队列管理器,请使用 dltmqm 命令。但是,请注意这将完全删除该队列管理器的数据和日志文件。删除队列管理器后,可以使用 rmvmqinf 命令从其他节点除去剩余的配置信息。

附录:

重要的配置文件:/var/mqm/mqs.ini

进入队列管理器命令:

#cd /var/mqm

#runmqsc ZJPORT_QM

本文来源:https://www.2haoxitong.net/k/doc/5a78149efd0a79563c1e72e4.html

《LINUX 下MQ V7.1的安装和配置 及双机搭建.doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

文档为doc格式