IBM MQ v7 installation
1 Preparations on MQ server
1.1 User creation
Create following user with group name of “mqm”
mqm, crtmqm,strmqm
1.2 Create mqm under /opt and /var
create /opt/mqm, make it RW to mqm group and 600MB in space capacity
create /var/mqm, make it RW to mqm group and 300MB in space capacity
1.3 Kernel configuration
make following kernel changes (/etc/sysctl.conf ):
kernel.msgmni = 1024
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 500 256000 250 1024
fs.file-max = 32768
net.ipv4.tcp_keepalive_time = 300
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.
1.4 Max open files
If the system is heavily loaded, you might need to increase the maximum possible number of open files. If your distribution supports the proc filesystem you can query the current limit by issuing the following command: cat /proc/sys/fs/file-max
If you are using a pluggable security module such as PAM (Pluggable Authentication Module), ensure that this does not unduly restrict the number of open files for the ’mqm’ user. For a standard WebSphere MQ queue manager, set the ’nofile’ value to 10240 or more for the ’mqm’ user. We suggest you add this command to a startup script in /etc/rc.d/…
1.5 Max process
A running WebSphere MQ queue manager consists of a number of thread programs, and each connected application will increase the number of threads running in the queue manager processes. You should ensure that the maximum number of processes which the mqm user is allowed to run is not unduly restricted by one of the pluggable security modules such as PAM. Set nproc for the mqm user to 4090 or more.
1.6 Root access privilege
this is needed when doing the MQ installation.
1.7 64bit consideration
Implications of a 64-bit queue manager Note: A 64-bit queue manager is available on the POWER, x86-64 and zSeries (s390x) platforms. When using the 64-bit queue manager, the use of the LIBPATH and LD_LIBRARY_PATH environment variable is not advised.
The recommended way of using WebSphere MQ commands and your applications is as follows:
· Unset LIBPATH and LD_LIBRARY_PATH and build your applications with a built in path to the appropriate WebSphere MQ libraries, this is detailed in the appropriate WebSphere MQ book for your type of WebSphere MQ application.
· If you need to set LIBPATH or LD_LIBRARY_PATH, consider not including /usr/lib in the path you specify in the variable. If you need to include /usr/lib in your LIBPATH or LD_LIBRARY_PATH then in order to avoid errors running 64-bit WebSphere MQ applications or WebSphere MQ commands, consider removing the symbolic links from /usr/lib to the 32-bit WebSphere MQ libraries using the dltmqlnk command. The symbolic links can be restored with the crtmqlnk command. You also need to build your applications with a built in path to the appropriate WebSphere MQ libraries.
Note that both the dltmqlnk command and the crtmqlnk command are scripts, and take no parameters.
· If you cannot use either of the first two options, run your applications in a different environment to the one which issues any WebSphere MQ commands.
Note: WebSphere MQ libraries are in the following locations: /opt/mqm/lib (32-bit libraries) and /opt/mqm/lib64 (64-bit libraries).
2 Installation
2.1 Install rpm
2.1.1 Log in as root.
And make sure all RPMs are in your current directory.
2.1.2 Run the mqlicense.sh script.
If you want to view a text-only version of the license, which can be read by a screen-reader, type: ./mqlicense.sh -text_only
The license is displayed.
If want to accept the license without it being displayed, you can run the mqlicense.sh script with the -accept option. ./mqlicense.sh -accept
You must accept the license agreement before you can proceed with the installation.
2.1.3 Install components
Use the rpm -ivh command to install each component that you require.
The minimum components you must install are:
· MQSeriesRuntime
· MQSeriesJRE
· MQSeriesServer
· MQSeriesJava
This example shows a minimum installation:
rpm -ivh MQSeriesRuntime-7.0.0-0.i386.rpm MQSeriesSDK-7.0.0-0.i386.rpm MQSeriesServer-7.0.0-0.i386.rpm MQSeriesJava-7.0.0-0.i386.rpm
for 64bit:
rpm -ivh MQSeriesRuntime-7.0.0-0.x86_64.rpm
rpm -ivh MQSeriesJava-7.0.0-0.x86_64.rpm MQSeriesJRE-7.0.0-0.x86_64.rpm MQSeriesServer-7.0.0-0.x86_64.rpm
You can reinstall the /bin/sh shell using RPM, or specify the RPM option –nodeps to disable dependency checking during installation of WebSphere MQ.
Install rest of the components:
rpm -ivh MQSeriesSDK-7.0.0-0.x86_64.rpm
rpm -ivh MQSeriesSamples-7.0.0-0.x86_64.rpm
rpm -ivh MQSeriesClient-7.0.0-0.x86_64.rpm
rpm -ivh gsk7bas-7.0-4.14.i386.rpm
rpm -ivh gsk7bas64-7.0-4.14.x86_64.rpm
rpm -ivh MQSeriesKeyMan-7.0.0-0.x86_64.rpm
rpm -ivh MQSeriesMan-7.0.0-0.x86_64.rpm
rpm -ivh MQSeriesTXClient-7.0.0-0.x86_64.rpm
rpm -ivh MQSeriesEclipseSDK33-7.0.0-0.x86_64.rpm
rpm -ivh MQSeriesConfig-7.0.0-0.x86_64.rpm
2.1.4 client install:
Install minimum components:
· MQSeriesRuntime
· MQSeriesJRE
· MQSeriesServer
· MQSeriesJava
for 64bit:
rpm -ivh MQSeriesRuntime-7.0.0-0.x86_64.rpm
rpm -ivh MQSeriesJava-7.0.0-0.x86_64.rpm MQSeriesJRE-7.0.0-0.x86_64.rpm MQSeriesServer-7.0.0-0.x86_64.rpm
Then:
rpm -ivh MQSeriesClient-7.0.0-0.x86_64.rpm
2.2 Install verification
2.2.1 Create a sample Queue
mqm@dev15>crtmqm -q venus.queue.manager
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ queue manager created.
Creating or replacing default objects for venus.queue.manager.
Default objects statistics : 58 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.
mqm@dev15>strmqm
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ queue manager ‘venus.queue.manager’ starting.
5 log records accessed on queue manager ‘venus.queue.manager’ during the log replay phase.
Log replay for queue manager ‘venus.queue.manager’ complete.
Transaction manager state recovered for queue manager ‘venus.queue.manager’.
WebSphere MQ queue manager ‘venus.queue.manager’ started.
mqm@dev15>runmqsc
5724-H72 (C) Copyright IBM Corp. 1994, 2008. ALL RIGHTS RESERVED.
Starting MQSC for queue manager venus.queue.manager.
define qlocal (orange.queue)
1 : define qlocal (orange.queue)
AMQ8006: WebSphere MQ queue created.
end
2 : end
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
mqm@dev15>
2.2.2 Test the sample queue
mqm@dev15>cd /opt/mqm/samp/bin
mqm@dev15>./amqsput ORANGE.QUEUE
Sample AMQSPUT0 start
target queue is ORANGE.QUEUE
Sample AMQSPUT0 end
Sample AMQSPUT0 end
mqm@dev15>./amqsget ORANGE.QUEUE
Sample AMQSGET0 start
message
no more messages
Sample AMQSGET0 end
Tips for during the tutorial:
1. Use “runmqsc QUEUE_NAME” to switch between queue management
2. When set sender channel, use “IP(PORT)” for connection name if the management queue port is not 1414.
3. Running the amqsput and amqsputc samples
These programs each take 2 parameters:
· The name of the target queue (required)
· The name of the queue manager (optional)
If a queue manager is not specified, amqsput connects to the default queue manager and amqsputc connects to the queue manager identified by an environment variable or the client channel definition file. To run these programs, enter one of the following:
· amqsput myqueue qmanagername
· amqsputc myqueue qmanagername
where myqueue is the name of the queue on which the messages are going to be put, and qmanagername is the queue manager that owns myqueue.
4. Client-server testing – windows id (hliang) should be set in MCA ID and also a user on Linux OS with mqm as group.
· On window
MQSERVER=CLIENT.MQ_ORANGE/TCP/192.168.1.205(1416)
C:\Documents and Settings\hliang>set MQSERVER=CLIENT.QM_ORANGE/TCP/192.168.1.205(1416
C:\Documents and Settings\hliang>amqsputc Q1
Sample AMQSPUT0 start
target queue is Q1
dsfasdfhsa
fkdsajfhas
Sample AMQSPUT0 end
· On linux
export MQSERVER=CLIENT.QM_ORANGE/TCP/192.168.1.205
$ ./amqsput Q1 QM_ORANGE (./amqsput Q1)
Sample AMQSPUT0 start
target queue is Q1
qqqqqqqqqqqqqqq
wwwwwwwwwwwwwwww
Sample AMQSPUT0 end
1 Comment »
Leave a comment
-
Recent
-
Links
-
Archives
- July 2009 (1)
- May 2009 (2)
- February 2009 (1)
- September 2008 (3)
-
Categories
-
RSS
Entries RSS
Comments RSS
First of all, thanks for the post!
The option –nodeps should really be –nodeps.