IBM Data Server DB2 User Manual

Page 181

Advertising
background image

Chapter 4. Deploying applications with DB2

167

echo "
System variables registered.
Please re-login to have the settings be effective."
;;
*) echo "
You choose not registering system variable.
It could be finished later by adding following lines to your user profile:
export LIBPATH=$LIBPATH:$ODBCLIBPATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ODBCLIBPATH"
if [ `uname` == "AIX" ]; then
echo " export
DB2_CLI_DRIVER_INSTALL_PATH=$DB2_CLI_DRIVER_INSTALL_PATH:$ODBCLIBPATH"
fi

;;
esac

printf "\n Deployment finished.\n"

5. After placing the three files under their own directories, we can create a

package based on this directory structure and redistribute it to the target
machine where we want the application to be deployed. Example 4-13 shows
how a package file,

app_installer.tar.gz

, is created using the commands

tar

and

gzip

.

Example 4-13 Generate a gz package from install_image directory

db2app@mensa:~/app_install/install_image> tar -cvf - *|gzip -c >
../app_installer.tar.gz
app_install
bin/
bin/itso_cliapp
odbcdrv/
odbcdrv/odbc_cli.tar.gz

Deploying the application package to the target system

On the target system, you have to configure the IBM Data Server Driver for
ODBC and CLI to prepare the system for the application. For the driver
configuration, refer to 4.1.2, “IBM Data Server Driver for ODBC, CLI, and .NET,
and IBM Data Server Driver for ODBC and CLI” on page 143 f
or platform specific
steps.

The db2cli.ini and other system environment variables may also require
configuration based on the database connection used in the application. You can
manually configure the target system or automate these configurations with a
deployment script.

Advertising