IBM Data Server DB2 User Manual
Page 176
162
DB2 Deployment Guide
There are three command line options for the script.
– Option -d specifies the path of the DB2 Driver file for ODBC and CLI. It
normally has a suffix tar.gz or tar.Z.
– Option -r specifies the file name of the redistributable file list. In our case, it
is redist.txt.
– Option -o specifies the name of the output file.
5. In Example 4-7 we execute the script to generate a redistributable package.
We issue it from the working folder followed with the file name of the ODBC
CLI driver, redist.txt, and the output package name.
Example 4-7 Issue commands to generate the redistributable package
# ./bldpkg -d /software/V95/v9.5_linuxx64_odbc_cli.tar.gz -r redist.txt -o
itso_cli
Totally 27 files added to new package isto_cli.tar.gz.
6. In Example 4-8, we verify the generated package by listing its content.
Example 4-8 Verify package content
# ls -al
total 9353
-rwxr--r-- 1 root root 2489 Jun 18 12:35 bldpkg
-rw-r--r-- 1 root root 9557833 Jun 18 12:40 itso_cli.tar.gz
-rw-r--r-- 1 root root 379 Jun 18 12:18 redist.txt
# gunzip -c itso_cli.tar.gz|tar -tf -
clidriver/
clidriver/adm/
clidriver/adm/db2trc
.....
7. After finishing these steps, we have created a new package called
itso_cli.tar.gz. It could be included into the application installation image and
redistributed to the target systems.
Preparing the application executable file
The source code should be compiled and linked to generate a binary executable
file for deployment. There are two approaches to build a CLI application
executable file. One is to use the bldapp script included in the DB2 installation
image. After you have set up an application development environment, you can
find it in the directory sample/c under the DB2 installation path. This approach
requires a database development environment setup. For how to configure the
database application development environment, see the DB2 Information center: