IBM manual Deploying the DB2 PHP application, Example 4-23 Deploying using script phpappinstall

Models: DB2

1 298
Download 298 pages 30.19 Kb
Page 194
Image 194

Deploying the DB2 PHP application

The deployment process for the DB2 PHP application involves transfer of the deployment package to the target system, uncompressing/extracting files in the package, and then executing the deployment script. See Example 4-23for the steps involved in DB2 PHP application deployment.

Example 4-23 Deploying using script php_app_install

$whoami php_dep

$gunzip -c php_app_installer.tar.gz tar -xf -

$ls -l total 7268

drwxrwxr-x 2 php_dep

test01

4096 2008-06-26

22:44 bin

drwxrwxr-x 2 php_dep

test01

4096 2008-06-26

22:44 odbcdrv

-rwxr-xr-x 1 php_dep

test01

3139 2008-06-26

17:02 php_app_install

-rw-rw-r-- 1

php_dep

test01 7411435 2008-06-27

00:12 php_app_installer.tar.gz

drwxrwxr-x 2

php_dep

test01

4096 2008-06-26

22:44 phpdriver

$ ./php_app_install -p /home/php_dep/php_app -r

 

System variables registered.

 

Please re-login

to have the settings be effective.

Deployment finished.

After the deployment script is executed, you have to logout and login again in order for the new environment setting to take effect. You can now see the subdirectories in the specified location. The PHP application is placed under the bin subdirectory of the specified location. After successful deployment, you are now ready to proceed with the application testing. Example 4-24shows the output of our newly deployed sample application, itso_phpapp.php.

Example 4-24 Verifying deployed PHP application

$ cd /home/php_dep/php_app/bin

$php itso_phpapp.php mensa 50001 test db2inst1 password Trying to establish connection...

Connection succeeded. Closing connection...

Connection closed.

180DB2 Deployment Guide

Page 194
Image 194
IBM Deploying the DB2 PHP application, Example 4-23 Deploying using script phpappinstall, 180 DB2 Deployment Guide