IBM Data Server DB2 User Manual
Page 210
196
DB2 Deployment Guide
# Install the setuptools and egg.
cd $CURPATH/$DIR_EGG
sh setuptools*.egg
easy_install ibm_db*.egg
cd $INSTPATH
mkdir -p "$DIR_DRV"
cd $DIR_DRV
for file in "$CURPATH/$DIR_DRV/*.tar.gz"
do
gunzip -c $file|tar -xf -
done
# register system variable
ODBCLIBPATH=`find $INSTPATH/$DIR_DRV -type d -name lib`
case $REGVAR in
Y) echo "
# The following lines have been added by py_app_install script
export LIBPATH=$LIBPATH:$ODBCLIBPATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ODBCLIBPATH
" >> ~/.profile
if [ `uname` == "AIX" ]; then
echo " export
DB2_CLI_DRIVER_INSTALL_PATH=$DB2_CLI_DRIVER_INSTALL_PATH:$ODBCLIBPATH" >> ~/.profile
fi
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"
We placed the deployment script under our deployment directory
/python_deploy. Example 4-35 shows the contents of python_deploy directory
that now has all the files to be deployed.