IBM Data Server DB2 User Manual
Page 192
178
DB2 Deployment Guide
cd $CURPATH
if [ ! -d $DIR_DRV ] || [ ! -d $DIR_APP ] || [ ! -d $DIR_PHP ] ; then
echo " ODBC CLI driver, Application or driver directory not existing.\n Abort."
exit 1
fi
# deploy application and php driver
cd $INSTPATH
cp -R "$CURPATH/$DIR_APP" .
cp -R "$CURPATH/$DIR_PHP" .
# Install the php driver
PHPPATH=`which php`
FILENAME=`dirname $PHPPATH|sed 's/\/[^/]*$//'`"/lib/php.ini"
echo "extension_dir="$INSTPATH/$DIR_PHP >> $FILENAME
echo "extension=ibm_db2.so" >> $FILENAME
# Uncompress ODBC CLI driver to specified path
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 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"