On the recent project of mine I had to install WebSphere MQ multiple times on multiple machines. In this post I would like to share script that I have built to automate the entire WMQ installation process on a freshly installed RHEL down to about 60 seconds and only a single click. Sounds exciting? Lets get started!
Initially I have used several scripts provided to me by folks from the IBM Hursley lab in UK. Those Perl based scripts do every possible thing with WebSphere MQ, and then some more🙂. For my use I decided to create my own script – not as flexible as the one I had received from the IBM lab, but simple to use for inexperienced user. My desire was to install WMQ with “one click”. IBM does provide a very detailed installation instructions for WebSphere MQ in the official docs, but those instructions may seem intimidating to the inexperienced user, hence my desire to have “one click” install for WMQ. I wish something like this came with the product – perhaps it will? Hey, I am sharing the source🙂. Before the installation you need the following:
- Red Hat Enterprise Linux v6.5 up and running
For my demo I happen to use 64 bit RHEL 6.5 on VMware Workstation under Windows 7 on a 2 year old ThinkPad.
- Your Linux user needs to be in the sudoers file
Here are the steps as described by Red Hat manual.
- Download free trial version of the WebSphere MQ 7.5 for Linux from IBM website (449 MB*) into your Downloads folder:
- Download my script wmq_lab.zip and save the file in the Downloads directory of the user and unpack it:
cd $HOME unzip Downloads/wmq_lab.zip cd wmq_lab
If you are wondering why the WMQ download size is 449 MB, you should know that WMQ install image includes JDK as well as administration tools, managed file transfer tools, advanced message security tools, and few other things that you wont find with any other messaging product.In my wmq_lab.zip file I also included a jar file containing the IBM Performance Harness for JMS v1.2. You can download this jar from IBM website if you wish and replace the one I provided.
Once you have all of the above, you can run “one click” WebSphere MQ install. Here is what is going to happen while you run the script:
- Several Linux kernel settings will be changed to recommended defaults per WMQ docs.
- IBM license will be “accepted”.
- Some important WMQ packages will get installed using the rpm command.
- New queue manager will be created.
- Basic tuning options will be applied to your new queue manager.
- Two queues will be defined on the queue manager.
- Test program will put a message on each of the queues.
- WMQ Explorer will be started so you can manage your brand new WebSphere MQ installation.
- Chocolate bar will pop out of your DVD drive… No, not really. You’ve had enough magic for the day, haven’t you?
All of the above with just a single command. You can easily customize my script to create any number of queue managers and queues, customize install paths, etc. I will post detailed explanation of the script in a separate post. Here is the “one click” command:
- Let the magic begin:
- Youare done! To test your new queues you can run some workload on them with another script I provided:
In the future post, I will explain the script in detail, but you can download and use it now. Feel free to apply customizations as you see fit. Please note that this script is designed for those who are not familiar with WMQ to get them up and running quickly. For real production environments you would want to apply security settings, tuning specific to your corporate standards, etc. All of that can be scripted using powerful WMQ API, or command line, or scripting commands, as described in the WebSphere MQ product documentation.
PS. If you are interested in working with IBM Integration Bus (IIB for short – old name WebSphere Message Broker), you could easily extend the concept of 1 click install to be able to install WMQ + IIB in 2 minutes with a “single click”. Here is my article with manual install instructions for WMB and performance testing script for it.
PS 1. Here is the latest article that shows one click installation of IIB v9 for Developers.