Chapter 2. DB2 server deployment 65
Figure 2-7 Logic of the mass deployment script
Example 2-18 shows 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
Script Start
Parse command line options
Do basic synatx check on options
chksyntax ()
Mount NFS on remote machine
mountnfs ()
Try ssh connection
Perform response file deployment
resp_dply ()
Perform db2_install deployment
db2install_dply ()
Unmount NFS on remote machine
umountnfs ()
Read next hostname Script End
Empty
Failure