How to install Websphere MQ on Linux
http://haxordoubt.blogspot.com/2014/04/how-to-install-websphere-mq-on-linux.html
Linux |
Hello HaxorFans, today i'm writing this article on how to install Websphere MQ
on a Linux server, i came with this decision after posting my MQ Introduction on LinkedIn and received some comments about
this Linux Installation.
Installing MQ can be a very easy task, but it is
not only installation, some best practice configurations and Kernel performance
tasks must be applied after installation.
The Software
Well first of all we need the MQ Software, you will
have to buy a license or get a Free or Trial version of MQ, for more
information, please visit: IBM WEBSPHERE MQ
After you get your MQ Software, please put the
package you downloaded into /home/youruserid
youuserid refers to the id you use to login and
extract it.
The
Pre-Installation
Service
Accounts:
Before we install WMQ we will need to create the
user and group that we will use as Service Account for MQ.
Create Group: groupadd mqm
Create user: useradd -g mqm mqm
FileSystems:
We will need to create 2 mqm folders for MQ
installation, one in /var and another in /opt.
Both will have to be owned by mqm group and have at
least 500 MB each.
cd /opt/
mkdir mqm
chown -R mqm:mqm mqm
cd /var/
mkdir mqm
chown -R mqm:mqm mqm
The
Installlation
First you will need to navigate to the extracted MQ
folder you downloaded, and then run this command:
./mqlicense
-accept
If you get
a JRE Java Error, please use this commands:
./mqlicense
-accept -jre PATH_TO_JRE
rpm -ivh MQSeriesServer-x.x.x-x.i386.rpm
MQSeriesRuntime-x.x.x-x.i386.rpm
where
x.x.x-x is the version number like 7.0.1-1
The
Configuration
After the MQ has been
installed we will need to configure some Kernel values for best performance.
Locate Files:
First step will be to
locate the following files and create a Backup and if files don’t exist, create
it.
/etc/sysctl.confback
File to edit
/etc/sysctl.conf
Command to Backup
cp /etc/sysctl.conf
/etc/sysctl.confback
Command to create if
non-existant
Touch /etc/sysctl.conf
/etc/security/limits.conf
File to edit
/etc/security/limits.conf
Command to Backup
cp
/etc/security/sysctl.conf /etc/limits.confback
Command to create if
non-existant
Touch /etc/security/limits.conf
Edit File:
If the file exists or it
was created manually, please add the following lines:
NOTE: If the values after
the equal sign (=) in an already existant file are higher that the ones
described below, leave the higher values.
/etc/sysctl.conf
Kernel: kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 268435456
kernel.sem = 500 256000 250
1024
fs.file-max = 524288
tcp_keepalive_time = 300
/etc/security/limits.conf
mqm hard nofile 10240
mqm soft nofile 10240
mqm hard nproc 4096
mqm soft nproc 4096
Reload Config
Files
In order to apply the
changes we made on the above files we will need to run the following command:
sysctl -p
Rollback
In order to rollback,
please run the following commands:
/etc/sysctl.confback
rm /etc/sysctl.conf
mv /etc/sysctl.confback
/etc/sysctl.conf
/etc/security/limits.confback
rm
/etc/security/limits.conf
mv/etc/security/limits.confback
/etc/security/limits.conf
After this steps have been followed, you will have a MQ Server
installation complete on your server, if you are interested on the Operational
Commands for MQ, please go to Websphere MQ Introduction