Control M Agent Remote Installation

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Control M Agent Remote Installation

Control M Agent accounts


The Control-M agent is installed as one or more of the users: cmag_qa, cmag_ps,
cmag_dev, cmag_prd, or cmag_bm. These correspond to QA, P-stage, development,
production, or benchmark, respectively. For uniformity, all of these accounts have a
home directory of /opt/control_m/$VERSION/$USER, where $VERSION is the
Control-M version number (without dots; the current install version is represented as
6201), and $USER is the username.

Currently, there is no need to set a password for these accounts, as they are only being
used from scripts via the su command.

The accounts have user ID’s as follows:

Account name UID


cmag_qa 35
cmag_ps 36
cmag_dev 37
cmag_prd 38
cmag_bm 39

The Control-M server components use analogous accounts, starting with cmsv and
cmem. Their user ID’s are plus or minus 5 from agent user ID’s. For example,
cmsv_bm has a user ID of 44, while cmem_bm has a user ID of 34.

File locations
All of the necessary files to install the agent are in the /usr/local/depot/ctrl_m
directory on hq1ap100. This directory is available for read-only NFS mounting across
the entire BCBSNC network.

Installation prerequisites
The system where the client is being installed must have 40MB of free space on the
filesystem where /opt/control_m/$VERSION/$USER will reside. Each
installation consumes about 15MB, so add 15MB per additional client to that free space
requirement.

The installation media take about 950 MB of space, so if you can’t NFS mount the
installation directory, you will need to find about a gigabyte of space to put it.

Set your umask to 022 before you begin the installation – the install may be broken
otherwise.
Client installation (manual)
All of these steps assume you are logged in to the installation system as root
1. Create the necessary client accounts.
2. Create a mount point for the NFS directory (/tmp/ctlm will be assumed).
3. Mount the NFS directory.
4. Change to the client account home directory.
5. Run the setup.sh command with the appropriate response file. The exact syntax
for qa would be:
/tmp/ctlm/Unix/setup.sh -respond /tmp/ctlm/resp.qa
6. Copy the appropriate rc scripts to /etc/rc.d/init.d:
cp /tmp/ctlm/control_m.unified /etc/rc.d/init.d
chmod 755 /etc/rc.d/init.d/control_m.unified
7. Create symbolic links from the rc scripts into /etc/rc.d/rc2.d:
ln –sf /etc/rc.d/init.d/control_m.unified \
/etc/rc.d/rc2.d/S99control_m.ag.qa
8. Stop the agent with the newly installed rc script.
9. Install the patch with this command:
echo y|su – cmag_qa –c /tmp/ctlm/PAKAI.6.2.01.100
10. Restart the agent with the installed rc script.
11. Unmount the NFS directory (and optionally delete the mount point).

If you can’t NFS mount the remote directory, replace step #3 above with:
3. Recursively copy the files from hq1ap100 with this command:
su distunix –c ‘scp –r hq1ap100:/usr/local/depot/ctrl_m\
/tmp/ctlm’

If you don’t have enough space in the /tmp filesystem, copy the files to where you have
space and set up a symbolic link.

Client installation (automated)


You can also use the following script (which assumes that the requisite users accounts
have already been created, and that it’s running as root). The script is also in the install
directory as install.sh. It expects a single argument, which corresponds to the
instance (‘qa’, ‘ps’, ‘bm’, ‘dev’, or ‘prd’).

Note: I haven’t tested the script very thoroughly – it may not work as intended.
#! /usr/bin/ksh
if [ $# != 1 ] ; then
echo Usage:
echo $0 instance
exit 2
fi
user=”cmag_$1”
home=`lsuser –a home $user 2> /dev/null | awk –F= ‘{print $2}’`
if [ x = “x$home” ] ; then
echo “$0: user $user does not exist”
exit 3
fi
if [ ! –d $home ] ; then
echo “$0: directory $home does not exist”
exit 4
fi
resp=”resp.$1”
oumask=`umask`
umask 022
didmount=0
if [ ! –r /tmp/ctlm/$resp ] ; then
mkdir –p /tmp/ctlm 2> /dev/null
mount hq1ap100:/usr/local/depot/ctrl_m /tmp/ctlm 2> /dev/null
if [ ! –r /tmp/ctlm/$resp ] ; then
echo “$0: response file $resp can’t be read”
exit 5
fi
didmount=1
fi
cd $home
/tmp/ctlm/Unix/setup.sh –respond /tmp/ctlm/$resp
if [ ! –r /etc/rc.d/init.d/control_m.unified ] ; then
cp /tmp/ctrl_m/control_m.unified /etc/rc.d/init.d
chmod 755 /etc/rc.d/init.d/control_m.unified
fi
ln –sf /etc/rc.d/init.d/control_m.unified \
/etc/rc.d/rc2.d/S99control_m.ag.$1
/etc/rc.d/rc2.d/S99control_m.ag.$1 stop
echo y|su - $user –c /tmp/ctlm/PAKAI.6.2.01.100
/etc/rc.d/rc2.d/S99control_m.ag.$1 start
if [ $didmount –gt 0 ] ; then
umount /tmp/ctlm
fi
umask $oumask

You might also like