Script Start

Parse command line options

Do basic synatx check on options

chksyntax ()

 

Read next hostname

Empty

Script End

 

 

Failure

Try ssh connection

 

 

 

 

 

 

 

Mount NFS on remote machine

 

 

mountnfs ()

 

 

 

Perform response file deployment

Perform db2_install deployment

resp_dply ()

 

db2install_dply ()

 

 

Unmount NFS on remote machine

 

 

umountnfs ()

 

 

Figure 2-7 Logic of the mass deployment script

Example 2-18shows our sample deployment script db2srv_install.

Example 2-18 Source code of db2srv_install

#!/usr/bin/ksh

##############################################################

#

#Mass deployment script for DB2 for UNIX/Linux

##############################################################

#db2srv_install -D-R -N <NFSpath> -H hostA,hostB,...,hostN

#

-r response_file -b install_path -f NOTSAMP

#

-p productShortName -c NLPACK_location -n

#

-L language -l logfile -t tracefile"

#

 

##############################################################

#setopts=-x

setopts="${setopts:-+x}" set ${setopts?}

#clean variables unset CMDOPTS MOD

Chapter 2. DB2 server deployment 65

Page 79
Image 79
IBM DB2 manual Logic of the mass deployment script, Example 2-18 Source code of db2srvinstall