Re: Solaris 2.4 and Informix
Posted in 1996
Hi Sean and Dave,
I have similar setup (Solaris 2.5 and Informix 5.0x).
Here are steps that I follow to startup and shutdow Informix SERVER
under Solaris.
1- Write start/stop script:
*) see attachment for example (infx_init)
2- Change mod and copy start/stop script to /etc/init.d
$chmod 755 infx_init
$cp infx_init /etc/init.d
3- Decide what RunLevels you would like to Start Infx Server
RunLevels 2: multiuser without network
RunLevels 3: multiuser with network
(For more discussion of Run Levels see attachments#2)
4- Make Startup file symbolic link to /etc/init.d/infx_init
ex: (I'd like to startup Informix server under RunLevel 3)
$cd /etc/rc2.d
$ln -s /etc/init.d/infx_init Sinfx_init
Please NOTE: The naming convention for startup Script start
with an UPPERCASE "S". Please refer to /etc/rc2 for more
information
5- Make Shutdown file symbolic link to /etc/init.d/infx_init
$cd /etc/rc0.d
$ln -s /etc/init.d/infx_init Kinfx_init
NOTE: see /etc/rc0 for more information (the Shutdown file
MUST start with UPPERCASE "K".
Please also read /etc/init.d/README /etc/inittab for more informations.
======================================================================
Attachments
==================== CUT HERE ===================================
#!/bin/sh
#
# infx_init solaris 2.5
# Author: Binh Thanh Nguyen
# Date : Tue Jan 30 15:00:29 PST 1996
# NOTE :
# Please chmod 755 this file and copy it to /etc/init.d
##################################################################
state=$1
INFORMIXDIR=/usr/informixexport INFORMIXDIR
# Substitute the name of your tbconfig file as appropriate.
TBCONFIG=tbconfig.fg
export TBCONFIG
#
SQLEXEC=${INFORMIXDIR}/lib/sqlturbo
export SQLEXEC
PATH=${PATH}:${INFORMIXDIR}/binexport PATH
case $state in
'start')
ps -ef | egrep 'tbinit' | egrep -v egrep > /dev/null
cck=$?
if [ $cck = 0 ]
then
echo "Informix Server is already initialized."
echo "Shutdown before reinitialize"
exit 0
fi
echo "\\n Informix Server initializing"
$INFORMIXDIR/bin/tbinit
if [ -x $INFORMIXDIR/lib/sqlexecd ] ; then
$INFORMIXDIR/lib/sqlexecd
fi
sleep 3
echo " Informix Server is up "
;;
'stop')
echo "Informix SERVER Down"
$INFORMIXDIR/bin/tbmode -ky
;;
*)
echo "Usage: /etc/init.d/infx_init { start | stop }"
;;
esac
======================== CUT HERE ==============================
Regards,
Binh Nguyen
CERFnet
------------------------------------------------------------------
Disclaimer: I would like include your best disclaimer here....
------------------------------------------------------------------
>
> We run Informix OnLine 5.05 on Solaris 2.4 on a Sun 1000.
> Here is a copy of our Informix startup file. It resides in
> /etc/rc3.d:
>
> # Startup for Informix
> #
> /usr/informix/bin/tbinit
> echo "Starting Informix OnLine....."
> sleep 3
> echo "Done."
> #
> # Startup Informix I-Star
> #
> echo "Starting Informix Sqlexec Daemon...."
> INFORMIXDIR=/usr/informix ; export INFORMIXDIR> SQLEXEC=$INFORMIXDIR/lib/sqlturbo ; export SQLEXEC
> $INFORMIXDIR/lib/sqlexecd
> echo "Done."
>
> We are running OnLine 5.05, but it appears you are running 6.X or 7.X
> based on your usual startup command of "oninit". Changing the tbinit
> to your usual oninit command should be the only real difference.
>
> Hope that helps.....
>
> -Dave
> --
> ) \\ / (
> /|\\ )\\_/( /|\\
> / | \\ (/\\|/\\) / | \\
> / | \\ \\`|'/ / | \\
> /___|___o_____\\|/_____o___|___\\
> __________________/_| '|^ V ^|` |_\\__________________
> \\ Internet: | David A. Buchholz | /
> \\ datacop@cfer.com | Database Administrator | Standard /
> > Voice: | ConferTech International | Disclaimers <
> / (303) 633-3089 |___________________________| Apply \\
> /_____________________)/ \\\\ V // \\ (_____________________\\
> | / V )) (( V \\ |
> |/ // \\\\ \\|
> V V
>
>
>