Monday, December 13, 2010

Installing and Configuring WebSphere MQ

> Installation
>> Configuring the OS
  • Create a user mqm with group mqm (groupadd mqm; useradd -g mqm mqm)
  • Create folders /var/mqm and /opt/mqm (mkdir /var/mqm /opt/mqm)
  • Make the user mqm the owner of these folders (chown mqm:mqm /var/mqm /opt/mqm)
>> Installing the RPM's
Obviously you need to install all the RPMs as root user and not mqm user.
For Server Installation, you need to install atleast the following RPMs
  • MQSeriesRuntime
  • MQSeriesJRE
  • MQSeriesServer
  • MQSeriesJava
For Client Installation, you need to install atleast the following RPMs
  • MQSeriesRuntime
  • MQSeriesJRE
  • MQSeriesClient
  • MQSeriesJava
I would also recommend installing the following packages:
  • MQSeriesSamples
> Configuration (or in other words verification)
>> Setting up the WebSphere MQ server
  • Create a default queue manager `crtmqm -q queue.manager.1`
  • Start the queue manager `strmqm`
  • Enter into MQSC to issue further commands `runmqsc`. This will cause you to enter the MQ console mode.
  • Create a local queue called QUEUE1 `define qlocal(QUEUE1)`
  • Create a Server-Connection channel, so that you can connect to this newly created queue `define channel(CHANNEL1) chltype(svrconn) trptype(tcp) mcauser(' ')`
  • Start the listener on the default TCP port of 1414 `start listener(system.default.listener.tcp)`. In case you need to run the server-connection on a different port issue command `alter listener(system.default.listener.tcp) trptype(tcp) port(1515)` to start it on port 1515.
  • Verify that listener has started successfully `display lsstatus(*)`
  • Log out from the MQSC using `end`
>> Setting up the WebSphere MQ client
You need to setup the environment varial MQSERVER as per your configuration of Channel and Server-Connection. For the example above we would set the MQSERVER variable as
export MQSERVER=CHANNEL1/TCP/'10.1.1.1(1414)'

Here CHANNEL1 is the channel you created, connection is of TCP to connect to IP address 10.1.1.1 on port 1414

>> Populating the queue
  • /opt/mqm/samp/bin/amqputsc QUEUE1 queue.manager.1. The following message gets displayed when you do this
    Sample AMQSPUT0 start
    target queue is QUEUE1
  • Type some message into the console. Press Enter twice to finish populating the queue.
>> Enter the following command to get back stuff from the queue QUEUE1.
/opt/mqm/samp/bin/amqsgetc QUEUE1 queue.manager.1
> Other Important Information
>> Stopping and deleting the queue
endmqm queue.manager.1 will stop the queue manager
dltmqm queue.manager.1 will delete the queue manager
>> Note that all the namings of queue manager, channel etc are CASE SENSITIVE. Hence you cannot refer to CHANNEL1 as Channel1 while trying to access it from local or remote MQ Client.
>> The binary amqsputc and amqsgetc are obtained from RPM MQSeriesSamples. Hence ensure you have this RPM installed, else you won't be able to locate these binaries.

Labels:

Sunday, December 5, 2010

Installing Firefox on RHEL6

When you try to install firefox rpm from DVD media of RHEL6 on the RHEL6 system, it asks for dependency system-bookmarks. However, there's no package named system-bookmarks on the RHEL6 DVD media.


[root@rhel6 Packages]# rpm -ivh firefox-3.6.9-2.el6.x86_64.rpm
warning: firefox-3.6.9-2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
system-bookmarks is needed by firefox-3.6.9-2.el6.x86_64


system-bookmarks, is actually redhat-bookmarks. Hence if you install it with firefox package, you'll have firefox installed without any problems.


[root@rhel6 Packages]# rpm -ivh firefox-3.6.9-2.el6.x86_64.rpm redhat-bookmarks-6-1.el6.noarch.rpm
warning: firefox-3.6.9-2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:redhat-bookmarks ########################################### [ 50%]
2:firefox ########################################### [100%]

Note: yum understands this and works properly when you install firefox.

Labels: , ,