{"id":4702,"date":"2015-05-03T11:11:31","date_gmt":"2015-05-03T03:11:31","guid":{"rendered":"http:\/\/rmohan.com\/?p=4702"},"modified":"2015-05-04T10:22:42","modified_gmt":"2015-05-04T02:22:42","slug":"4702","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4702","title":{"rendered":"How to Install MQ on Redhat Linux"},"content":{"rendered":"<h3 class=\"post-title entry-title\">How to Install MQ on Redhat Linux<\/h3>\n<div id=\"post-body-7597754158473641270\" class=\"post-body entry-content\">1.1 User creationLogin as<span class=\"Apple-converted-space\">\u00a0<\/span>root<span class=\"Apple-converted-space\">\u00a0<\/span>to install mq<\/p>\n<p>Create following user with group name of \u201cmqm\u201d which will be used to run MQ<br \/>\ngroupadd mqm # add group mqm (purpose of gropuadd is to create<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\na new group account)<br \/>\nuseradd -g mqm mqm # add user mqm to group mqm<br \/>\n(gpn)(usrn)<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\n# gpn \u2013 groupname<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\n# usrn &#8212; username<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\n(useradd or usermod command is used to add a user to a<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\ngroup.useradd command creates a new user or update<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\ndefault new user information.usermod command modifies a<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\nuser account i.e. it is useful to add user to existing<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\ngroup.User account related info is stored in \/etc\/passwd,<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\n\/etc\/shadow and \/etc\/group.)<\/p>\n<p>1.2 Create mount points to install MQ<\/p>\n<p>create mqm folder under \/opt and \/var where the Websphere MQ gets installed.<br \/>\ncreate \/opt\/mqm<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>root@li-dev01\/&gt; cd \/opt\/<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\nroot@li-dev01\/opt&gt; mkdir mqm # make it RW to mqm group and 600MB in space capacity<br \/>\ncreate \/var\/mqm as above # make it RW to mqm group and 300MB in space capacity<br \/>\nroot@li-dev01\/var&gt; mkdir mqm<\/p>\n<p>1.3 Kernel configuration parameters<\/p>\n<p>make following kernel changes (\/etc\/sysctl.conf ): # mq prerequisites<br \/>\nvi \/etc\/sysctl.conf<br \/>\n#add these propeties if they are not available<br \/>\nkernel.msgmni = 1024<br \/>\nkernel.shmmni = 4096<br \/>\nkernel.shmall = 2097152<\/p>\n<p>edit \/etc\/sysctl.conf<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\n#add<br \/>\nkernel.sem 250 32000 32 1024<\/p>\n<p>If you wish to load these sysctl values immediately, enter the command sysctl -p.<br \/>\nNote: If you do not issue the sysctl -p command, the new values are loaded when the system is rebooted.<\/p>\n<p>1.4 Max open files<\/p>\n<p>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<\/p>\n<p>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 \u2019mqm\u2019 user. For a standard WebSphere MQ queue manager, set the \u2019nofile\u2019 value to 10240 or more for the \u2019mqm\u2019 user. We suggest you add this command to a startup script in \/etc\/rc.d\/\u2026<\/p>\n<p>1.5 Max process<\/p>\n<p>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.<\/p>\n<p>1.6 Root access privilege<br \/>\nthis is needed when doing the MQ installation.<\/p>\n<p>1.7 64bit consideration<br \/>\nImplications 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.<\/p>\n<p>The recommended way of using WebSphere MQ commands and your applications is as follows:<br \/>\n\u2022 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.<br \/>\n\u2022 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.<br \/>\nNote that both the dltmqlnk command and the crtmqlnk command are scripts, and take no parameters.<br \/>\n\u2022 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.<br \/>\nNote: WebSphere MQ libraries are in the following locations: \/opt\/mqm\/lib (32-bit libraries) and \/opt\/mqm\/lib64 (64-bit libraries).<\/p>\n<p>2. Installation of Websphere MQ on Linux:<\/p>\n<p>2.1 Install rpm<\/p>\n<p>2.1.1 Log in as root.<\/p>\n<p>extract Websphere MQ files to the current directory(\/home\/test\/Desktop\/MQ)<br \/>\ntar -xzvf Websphere MQ for x86 6.0.tar.gz<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>And make sure all RPMs are in your current directory(\/home\/test\/Desktop\/MQ)<\/p>\n<p>2.1.2 Run the mqlicense.sh script.<\/p>\n<p>If you want to view a text-only version of the license, which can be read by a screen-reader, type:<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\nroot@li-dev01\/MQ&gt;.\/mqlicense.sh -text_only<br \/>\nThe license is displayed.If want to accept the license without it being displayed, you can run the mqlicense.sh script with the -accept option.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p># run this command from the current directory where Websphere MQ files are extracted.<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\nroot@li-dev01\/MQ&gt;.\/mqlicense.sh -accept<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\nYou must accept the license agreement before you can proceed with the installation.<\/p>\n<p>2.1.3 Install components<br \/>\nUse the rpm -ivh command to install each component that you require.<br \/>\nThe<span class=\"Apple-converted-space\">\u00a0<\/span>minimum<span class=\"Apple-converted-space\">\u00a0<\/span>components you must install are:<br \/>\n\u2022 MQSeriesRuntime<br \/>\n\u2022 MQSeriesJRE<br \/>\n\u2022 MQSeriesServer<br \/>\n\u2022 MQSeriesJava<br \/>\nThis example shows a minimum installation:<\/p>\n<p>rpm -ivh MQSeriesRuntime-6.0.0-0.i386.rpm MQSeriesSDK-6.0.0-0.i386.rpm MQSeriesServer-6.0.0-0.i386.rpm MQSeriesJava-6.0.0-0.i386.rpm<br \/>\n(At a strech u can install all the rpms or u can install one by one<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\n(1.) rpm -ivh MQSeriesRuntime-6.0.0-0.i386.rpm<br \/>\n(2.) rpm -ivh MQSeriesSDK-6.0.0-0.i386.rpm<br \/>\n(3.) rpm -ivh MQSeriesServer-6.0.0-0.i386.rpm<br \/>\n(4.) rpm -ivh MQSeriesJava-6.0.0-0.i386.rpm)<\/p>\n<p>for 64bit:<br \/>\nrpm -ivh MQSeriesRuntime-7.0.0-0.x86_64.rpm<br \/>\nrpm -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<\/p>\n<p>You can reinstall the \/bin\/sh shell using RPM, or specify the RPM option \u2013nodeps to disable dependency checking during installation of WebSphere MQ.<\/p>\n<p>Install rest of the components:<br \/>\nrpm -ivh MQSeriesSDK-7.0.0-0.x86_64.rpm<br \/>\nrpm -ivh MQSeriesSamples-7.0.0-0.x86_64.rpm<br \/>\nrpm -ivh MQSeriesClient-7.0.0-0.x86_64.rpm<br \/>\nrpm -ivh gsk7bas-7.0-4.14.i386.rpm<br \/>\nrpm -ivh gsk7bas64-7.0-4.14.x86_64.rpm<br \/>\nrpm -ivh MQSeriesKeyMan-7.0.0-0.x86_64.rpm<br \/>\nrpm -ivh MQSeriesMan-7.0.0-0.x86_64.rpm<br \/>\nrpm -ivh MQSeriesTXClient-7.0.0-0.x86_64.rpm<br \/>\nrpm -ivh MQSeriesEclipseSDK33-7.0.0-0.x86_64.rpm<br \/>\nrpm -ivh MQSeriesConfig-7.0.0-0.x86_64.rpm<\/p>\n<p>when you are installing<span class=\"Apple-converted-space\">\u00a0<\/span>MQSeriesIES33-7.0.0-0.x86_64.rpm, if you get any error saying that<span class=\"Apple-converted-space\">\u00a0<\/span>libstdc++.so<span class=\"Apple-converted-space\">\u00a0<\/span>is needed then go to the link<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>http:\/\/rpmfind.net\/linux\/rpm2html\/search.php?query=libstdc%2B%2B.so.5&#038;submit=Search+&#8230;<br \/>\nAnd search for<span class=\"Apple-converted-space\">\u00a0<\/span>libstdc++5.0-3.3.3-62745cl.i386.html<span class=\"Apple-converted-space\">\u00a0<\/span>GNU c++ library and download and Install that rpm.<br \/>\n(or)<\/p>\n<p>use rpm -ivh -nodeps MQSeriesIES33-7.0.0-0.x86_64.rpm<\/p>\n<p>2.1.4 client install:<\/p>\n<p>Install minimum components:<br \/>\n\u2022 MQSeriesRuntime<br \/>\n\u2022 MQSeriesJRE<br \/>\n\u2022 MQSeriesServer<br \/>\n\u2022 MQSeriesJava<\/p>\n<p>for 64bit:<br \/>\nrpm -ivh MQSeriesRuntime-7.0.0-0.x86_64.rpm<br \/>\nrpm -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<\/p>\n<p>Then:<br \/>\nrpm -ivh MQSeriesClient-7.0.0-0.x86_64.rpm<\/p>\n<p>================<br \/>\n2.2 Install verification<br \/>\n================<\/p>\n<p>2.2.1 Create a sample Queue<\/p>\n<p>login as MQM user<br \/>\nsu &#8211; mqm<\/p>\n<p>mqm@li-dev01&gt;crtmqm -q QM_test.queue.manager #-q indicates default queue manager<br \/>\nThere are 90 days left in the trial period for this copy of WebSphere MQ.<br \/>\nWebSphere MQ queue manager created.<br \/>\nCreating or replacing default objects for QM_test.queue.manager.<br \/>\nDefault objects statistics : 58 created. 0 replaced. 0 failed.<br \/>\nCompleting setup.<br \/>\nSetup completed.<\/p>\n<p># if queue manager is not created and gives<span class=\"Apple-converted-space\">\u00a0<\/span>AMQ8081<span class=\"Apple-converted-space\">\u00a0<\/span>error with863<span class=\"Apple-converted-space\">\u00a0<\/span>code<br \/>\ndownload<span class=\"Apple-converted-space\">\u00a0<\/span>fixpack<span class=\"Apple-converted-space\">\u00a0<\/span>from<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\nhttp:\/\/www-01.ibm.com\/support\/docview.wss?rs=171&#038;uid=swg24015717<\/p>\n<p>tar -xvf 6.0.2-WS-MQ-LinuxIA32-FP0005.tar<br \/>\nMake sure that Fix pack is extracted in the directory(\/home\/test\/Desktop\/Patch)<\/p>\n<p>rpm -ivh all the below rpms<\/p>\n<p>\u2022 MQSeriesRuntime<br \/>\n\u2022 MQSeriesJRE<br \/>\n\u2022 MQSeriesServer<br \/>\n\u2022 MQSeriesJava<\/p>\n<p># if queue manager is not created and gives<span class=\"Apple-converted-space\">\u00a0<\/span>AMQ8108<span class=\"Apple-converted-space\">\u00a0<\/span>error with893<span class=\"Apple-converted-space\">\u00a0<\/span>code then install<span class=\"Apple-converted-space\">\u00a0<\/span>IBMJava2-142-ia32-SDK-1.4.2-6.0.i386.rpm<span class=\"Apple-converted-space\">\u00a0<\/span>from the fix pack,<\/p>\n<p>when you are installing this rpm if you get any error saying that libXp.so, then go to the link and download that and install this rpm<br \/>\nftp:\/\/ftp.pbone.net\/mirror\/ftp.centos.org\/5.4\/os\/x86_64\/CentOS\/libXp-1.0.0-8.1.el5.i386.rpm<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>mqm@li-dev01&gt;strmqm<br \/>\nThere are 90 days left in the trial period for this copy of WebSphere MQ.<br \/>\nWebSphere MQ queue manager \u2018QM_test.queue.manager\u2019 starting.<br \/>\n5 log records accessed on queue manager \u2018QM_test.queue.manager\u2019 during the log replay phase.<br \/>\nLog replay for queue manager \u2018QM_test.queue.manager\u2019 complete.<br \/>\nTransaction manager state recovered for queue manager \u2018QM_test.queue.manager\u2019.<br \/>\nWebSphere MQ queue manager \u2018QM_test.queue.manager\u2019 started.<\/p>\n<p>mqm@li-dev01&gt;runmqsc<br \/>\n5724-H72 (C) Copyright IBM Corp. 1994, 2008. ALL RIGHTS RESERVED.<br \/>\nStarting MQSC for queue manager QM_test.queue.manager.<\/p>\n<p>define qlocal (test_QL.queue)<br \/>\n1 : define qlocal (test_QL.queue)<br \/>\nAMQ8006: WebSphere MQ queue created.<br \/>\nend<br \/>\n2 : end<br \/>\nOne MQSC command read.<br \/>\nNo commands have a syntax error.<br \/>\nAll valid MQSC commands were processed.<br \/>\nmqm@li-dev01&gt;<\/p>\n<p>2.2.2 Test the sample queue<br \/>\nmqm@li-dev01&gt;cd \/opt\/mqm\/samp\/bin<br \/>\nmqm@li-dev01&gt;.\/amqsput test_QL.QUEUE<br \/>\nSample AMQSPUT0 start<br \/>\ntarget queue is test_QL.QUEUE<br \/>\nSample AMQSPUT0 end<\/p>\n<p># if \/opt\/mqm\/samp\/bin is not found install rpm MQSeriesSamples.<\/p>\n<p>Sample AMQSPUT0 end<br \/>\nmqm@li-dev01&gt;.\/amqsget test_QL.QUEUE<br \/>\nSample AMQSGET0 start<br \/>\nmessage<br \/>\nno more messages<br \/>\nSample AMQSGET0 end<\/p>\n<p>3. Uninstalling Websphere MQ in Linux:<\/p>\n<p>Remove install RPMs<\/p>\n<p>login as root<\/p>\n<p>root@websphere mwinstall]# rpm -ivh IBMJava2-SDK-1.4.2-0.0.i386.rpm to install, so I queried to find out what the software name of the rpm was as you cannot use the rpm filename that you used to install the rpm.<\/p>\n<p>root@websphere mq]# rpm -qa | grep IBM<br \/>\nIBMJava2-SDK-1.4.2-0.0<\/p>\n<p>rpm -e IBMJava2-SDK-1.4.2-0.0<\/p>\n<p>This worked however for the other rpm;s I had to remove the fix-packs first<\/p>\n<p>Remove fix pack rpm&#8217;s<\/p>\n<p>Use this command to see which Websphere MQSeries base rpms and fixpacks are installed<br \/>\nroot@websphere mq]# rpm -qa | grep MQSeries<\/p>\n<p>I used rpm -ivh IBMJava2-142-ia32-SDK-1.4.2-6.0.i386.rpm to apply fix pack<br \/>\nSo I used rpm -e IBMJava2-142-ia32-SDK-1.4.2-6.0<\/p>\n<p>install: rpm -ivh MQSeriesRuntime-U809950-6.0.2-2.i386.rpm<br \/>\nremove: rpm -e MQSeriesRuntime-U809950-6.0.2-2<\/p>\n<p>install: rpm -ivh MQSeriesServer-U809950-6.0.2-2.i386.rpm<br \/>\nremove: rpm -e MQSeriesServer-U809950-6.0.2-2<\/p>\n<p>install: rpm -ivh MQSeriesJava-U809950-6.0.2-2.i386.rpm<br \/>\nremove: rpm -e MQSeriesJava-U809950-6.0.2-2<\/p>\n<p>Remove base rpm&#8217;s<\/p>\n<p>I had to do in this order<\/p>\n<p>rpm -e MQSeriesJava-6.0.0-0<\/p>\n<p>rpm -e MQSeriesServer-6.0.0-0<\/p>\n<p>rpm -e MQSeriesRuntime-6.0.0-0<\/p>\n<p>Query to make sure they have all been removed<\/p>\n<p>rpm -qa | grep MQSeries<\/p>\n<p>Remove MQ directories<\/p>\n<p>\/opt\/mqm # cd \/opt , rm -rf mqm<br \/>\n\/var\/mqm # cd \/var , rm -rf mqm<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to Install MQ on Redhat Linux 1.1 User creationLogin as root to install mq<\/p>\n<p>Create following user with group name of \u201cmqm\u201d which will be used to run MQ groupadd mqm # add group mqm (purpose of gropuadd is to create a new group account) useradd -g mqm mqm # add user mqm to [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4702"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4702"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4702\/revisions"}],"predecessor-version":[{"id":4704,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4702\/revisions\/4704"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}