IBM Data Server DB2 User Manual

Page 193

Advertising
background image

Chapter 4. Deploying applications with DB2

179

fi

;;
esac

printf "\n Deployment finished.\n"

We placed the deployment script under our deployment directory /php_deploy.
Example 4-21 shows the contents of the php_deploy directory that now has all
the files required for the deployment.

Example 4-21 Contents of php_deploy directory

itsouser@ubuntu:~/php_deploy$ ls -Rl
.:
total 16
drwxrwxr-x 2 itsouser itsouser 4096 2008-06-26 22:44 bin
drwxrwxr-x 2 itsouser itsouser 4096 2008-06-26 22:44 odbcdrv
-rwxr-xr-x 1 itsouser itsouser 3138 2008-06-26 22:44 php_app_install
drwxrwxr-x 2 itsouser itsouser 4096 2008-06-26 22:44 phpdriver

./bin:
total 4
-rw-r--r-- 1 itsouser itsouser 1125 2008-06-26 22:44 itso_phpapp.php

./odbcdrv:
total 7564
-rw-rw-r-- 1 itsouser itsouser 7730644 2008-06-26 22:44 itso_cli.tar.gz

./phpdriver:
total 184
-rwxr-xr-x 1 itsouser itsouser 181474 2008-06-26 22:44 ibm_db2.so

We can simply archive and compress the entire directory for distribution to other
systems. Example 4-22 demonstrates steps for package generation.

Example 4-22 Package generation for php_deploy

itsouser@ubuntu:~/php_deploy$ tar -cvf - *|gzip -c >
../php_app_installer.tar.gz
bin/
bin/itso_phpapp.php
odbcdrv/
odbcdrv/itso_cli.tar.gz
php_app_install
phpdriver/
phpdriver/ibm_db2.so

Advertising