# install dbd::db2

cd $INSTPATH/$DIR_DRV/DBD* perl Makefile.PL

make

make install

printf "\n Deployment finished.\n"

We placed the deployment script under our deployment directory /perl_deploy. Example 4-45shows the contents of perl_deploy directory that now has all the files to be deployed. The packaging shown here is just an example where we have put each type of files in different directories. You can of course decide on any packaging you consider good.

Example 4-45 Contents of perl_deploy directory

itsouser@ubuntu:~/perl_deploy$ ls -Rl

.: total 12

drwxrwxr-x 2 itsouser itsouser 4096 2008-06-28 22:51 bin drwxrwxr-x 2 itsouser itsouser 4096 2008-06-28 22:51 driver

-rwxr-xr-x 1 itsouser itsouser 2093 2008-06-28 22:51 perl_app_install

./bin: total 4

-rw-r--r-- 1 itsouser itsouser 1133 2008-06-28 22:51 itso_perlapp.pl

./driver: total 588

-rw-r--r-- 1 itsouser itsouser 84030 2008-06-28 22:51 DBD-DB2-1.1.tar.gz -rw-rw-r-- 1 itsouser itsouser 504313 2008-06-28 22:51 DBI-1.605.tar.gz

We can simply zip the entire directory for distributing to other systems. See Example 4-22.

Example 4-46 Package generation for perl_deploy

itsouser@ubuntu:~/perl_deploy$ tar -cvf - * gzip -c >

../perl_app_installer.tar.gz bin/ bin/itso_perlapp.pl driver/ driver/DBD-DB2-1.1.tar.gz driver/DBI-1.605.tar.gz perl_app_install

206DB2 Deployment Guide

Page 220
Image 220
IBM DB2 manual Example 4-45 Contents of perldeploy directory, Example 4-46 Package generation for perldeploy