198 DB2 Deployment Guide

Example 4-37 Deploying using script py_app_install

$ whoami
python_dep
$ gunzip -c py_app_installer.tar.gz | tar -xf -
$ ls -l
total 7872
drwxr-xr-x 2 python_dep test01 4096 2008-06-28 17:52 bin
drwxr-xr-x 2 python_dep test01 4096 2008-06-28 21:29 egg
drwxr-xr-x 2 python_dep test01 4096 2008-06-28 17:52 odbcdrv
-rwxr-xr-x 1 python_dep test01 2978 2008-06-28 11:25 py_app_install
-rw-rw-r-- 1 python_dep test01 8032077 2008-06-28 21:35 py_app_installer.tar.gz
$
$ ./py_app_install -p /home/python_dep/py_app -r
Processing setuptools-0.6c7-py2.5.egg
Copying setuptools-0.6c7-py2.5.egg to
/home/python_dep/setup/Python-2.5.1/lib/python2.5/site-packages
Adding setuptools 0.6c7 to easy-install.pth file
Installing easy_install script to /home/python_dep/setup/Python-2.5.1/bin
Installing easy_install-2.5 script to /home/python_dep/setup/Python-2.5.1/bin
Installed
/home/python_dep/setup/Python-2.5.1/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.e
gg
Processing dependencies for setuptools==0.6c7
Finished processing dependencies for setuptools==0.6c7
Processing ibm_db-0.2.9-py2.5-linux-x86_64.egg
creating
/home/python_dep/setup/Python-2.5.1/lib/python2.5/site-packages/ibm_db-0.2.9-py2.5-linux
-x86_64.egg
Extracting ibm_db-0.2.9-py2.5-linux-x86_64.egg to
/home/python_dep/setup/Python-2.5.1/lib/python2.5/site-packages
Adding ibm-db 0.2.9 to easy-install.pth file
Installed
/home/python_dep/setup/Python-2.5.1/lib/python2.5/site-packages/ibm_db-0.2.9-py2.5-linux
-x86_64.egg
Processing dependencies for ibm-db==0.2.9
Finished processing dependencies for ibm-db==0.2.9
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 see the subdirectories in the specified location. The Python application is put under the bin subdirectory of the specified location. After successful deployment, you are now ready to proceed with the application testing. Example4-38 shows the output of our newly deployed application, itso_pyapp.php .