We’ve had a few customers who want to run an IIB v10 shared install but who have limited root access. The good news is, as long as you can persuade a friendly admin to do some setup for you it is possible to get a non-root install working. You can follow the basic recipe below:
These steps are starting from a completely fresh machine so I have included creating the users and used sudo su -
as a shorthand for switching users. I am assuming that on a real system there will probably already be users with home dirs already existing and will use pwd based authentication to log in. You can therefore skip the steps that deal only with create users etc. This sequence was tested on Ubuntu 16.04, where commands vary across unix versions the same principle should apply.
Steps need as root (one off)
============================
1.) Add mqbrkrs group
sudo addgroup --group mqbrks
2.) Create 2 users in this group brokerId1 and brokerId2
sudo useradd -g mqbrkrs brokerId1
sudo useradd -g mqbrkrs brokerId2
3.) Create a directory to untar into under /opt and allow mqbrkrs to modify it
sudo mkdir /opt/ibm
sudo mkdir /opt/ibm/mqsi
sudo chown brokerId1:mqbrkrs /opt/ibm/mqsi
sudo chmod 775 /opt/ibm/mqsi
4.) Create home dirs for the users and chown them to the right userId
sudo mkdir /home/brokerId1
sudo mkdir /home/brokerId2
sudo chown brokerId1:mqbrkrs /home/brokerId1
sudo chown brokerId2:mqbrkrs /home/brokerId2
5.) Create /var/mqsi and associated directories and set them writable by the broker users
sudo mkdir /var/mqsi
sudo mkdir /var/mqsi/common
sudo mkdir /var/mqsi/common/locks
sudo mkdir /var/mqsi/common/log
sudo mkdir /var/mqsi/common/errors
sudo mkdir /var/mqsi/common/wsrr
sudo mkdir /var/mqsi/components
sudo mkdir /var/mqsi/config
sudo mkdir /var/mqsi/odbc
sudo mkdir /var/mqsi/registry
sudo mkdir /var/mqsi/shared-classes
sudo mkdir /var/mqsi/XML
sudo mkdir /var/mqsi/XML/external
sudo mkdir /var/mqsi/XSL
sudo mkdir /var/mqsi/XSL/external
sudo chmod -R 775 /var/mqsi
sudo chown -R brokerId1:mqbrkrs /var/mqsi
6.) Switch to broker user
sudo - brokerId1
Steps needed as mqbrkrs member (do this per fixpack)
======================================================
7.) Copy install image to /opt/ibm/mqsi and untar it
cp /home/davicrig/Downloads/iib-10.0.0.5.tar.gz /opt/ibm/mqsi
cd /opt/ibm/mqsi
tar -xvf iib-10.0.0.5.tar.gz
cd iib-10.0.0.5
8.) As brokerId1 accept the license
unset DISPLAY (#NB: this is a workaround for a ubuntu issue)
./iib accept license
9.) chown the install so it is readable by the mqbrkrs group
chown brokerId1:mqbrkrs .
10.) Modify mqsiprofile (vi server/bin/mqsiprofile) adding the following 2 lines immediately after the comments:
export MQSI_WORKPATH=/var/mqsi
export MQSI_REGISTRY=/var/mqsi
11.) Create the global reg file (this tells mqsiprofile to allow MQSI_WORKPATH to be overridden)
echo "/var/mqsi" > common/GLOBAL_REG
12.) As brokerId1 run the profile
. server/bin/mqsiprofile
Try some mqsicommands to verify it works
mqsicreatebroker broker1
13.) Login as brokerId2 and run the profile
sudo su – brokerId2
. /opt/ibm/mqsi/iib-10.0.0.5/bin/mqsiprofile
14.) Create a broker and start it
mqsicreatebroker broker2
mqsistartbroker broker2
15.) Verify both brokers were created in /var/mqsi
ls -la /var/mqsi/components
You should see lines like this:
drwxrwx--- 8 brokerId1 mqbrkrs 4096 Jul 4 14:36 broker1
drwxrwx--- 8 brokerId2 mqbrkrs 4096 Jul 4 14:37 broker2
If you have an existing /var/mqsi structure create by a previous install, for example if you are migrating from version 9 then you can skip step 5.