beautypg.com

IBM Data Server DB2 User Manual

Page 182

background image

168

DB2 Deployment Guide

In our example, there is no special configuration required for our application.
Therefore, no application specific configuration steps are included in the
deployment script.

We move the application package app_installer.tar.gz to target machine lepus
using

scp

. You can choose another method you prefer, such as

ftp

. Then we

deploy it using a local user prodapp as shown in Example 4-14.

Example 4-14 Deploy application using scrip app_installt

prodapp@lepus:/tmp/app> whoami
prodapp
prodapp@lepus:/tmp/app> scp
db2app@mensa:/home/db2app/app_install/app_installer.tar.gz . Password:
app_installer.tar.gz 100% 8914KB 8.7MB/s
00:01
prodapp@lepus:/tmp/app> gunzip app_installer.tar.gz
prodapp@lepus:/tmp/app> gunzip -c app_installer.tar.gz|tar -xf -
prodapp@lepus:/tmp/app> ls -l
total 8929
-rwxr--r-- 1 prodapp appgrp 2771 2008-06-23 14:57 app_install
-rw-r--r-- 1 prodapp appgrp 9128168 2008-06-23 15:03 app_installer.tar.gz
drwxr-xr-x 2 prodapp appgrp 80 2008-06-23 14:28 bin
drwxr-xr-x 2 prodapp appgrp 80 2008-06-20 16:20 odbcdrv
prodapp@lepus:/tmp/app> ./app_install -p /home/prodapp/cliapp -r

System variables registered.
Please re-login to have the settings be effective.

Deployment finished.

We re-login to the system to have the system variables take effect that were
already appended to .profile by the deployment script app_install.

The application has been deployed to the specified path. Change to the location
where we can see subdirectories bin and odbcdrv. The application executable
file itso_cliapp sits under directory bin. Refer to Example 4-15.

From there, we execute the application and try to establish a connection to a
database on another machine. It succeeds without error. This means that the
deployment is successful.