Start Sun Webserver at boot on Solaris 9?

Hi,

Can anyone tell me how to setup Sun Webserver 6 SP11 to boot at startup on Solaris 9?

I've read through the documentation, and tried to add the:

http:2:respawn:/usr/iplanet.../start -start -i

line to /etc/inittab, but it doesn't seem to start.

No messages appear in /var/adm/messages either, so I'm not quite sure what the problem is?

Thanks in advance,

Jim

[413 byte] By [jimcpl1a] at [2007-11-27 1:08:57]
# 1

Hi ,

There is a script from sun itself... to achieve it. see the following:

##############################################################

#!/bin/sh

#

# Startup/Shutdown Script for Sunone Web Server 6.1x - Solaris Version.

#

# Author: Sun Microsystems, Inc. (2003)

#

# Make sure we have PATH set at this point.

PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin"

# Set this to 0, if you do NOT want autostart after a system reboot.

S1WS_START_ONBOOT=1

# Environment Settings; Make the relevant changes here.

S1WS_HOME=PATH_TO_WEBSERVER_ROOT

S1WS_VERSION="X.X"

# Note: List all Non-Secure Web Instances in same line, seperated by one SPACE character.

WEB_INSTANCES="$S1WS_HOME/https-admserv $S1WS_HOME/https-INSTANCE"

# Note: Set SECINSTANCES_START to 1, if you want "Secure Web Instances" to be started.

# Note: List all Secure Web Instances in same line seperated by one SPACE.

SECINSTANCES_START=0

#SECURE_WEB_INSTANCES="$S1WS_HOME/https"

# End of Environment Settings.

rc_failed="Failure"

rc_success="Success"

ret=$rc_success

# See how we were called.

case "$1" in

start_msg)

echo "Sun ONE Web Server $S1WS_VERSION starting ($S1WS_HOME)"

;;

start)

if [ -z "S1WS_START_ONBOOT" ] || [ "$S1WS_START_ONBOOT" = "0" ]; then

ret=$rc_success

else

echo "Sun ONE Web Server $S1WS_VERSION starting ($S1WS_HOME)"

for each_server in $WEB_INSTANCES

do

if [ -d "$each_server" ]; then

echo " `basename $each_server`: \c"

$each_server/start || ret=$rc_failed

echo "$ret"

fi

done

if [ $SECINSTANCES_START = 1 ] ; then

for each_server in $SECURE_WEB_INSTANCES

do

if [ -d "$each_server" ]; then

echo " `basename $each_server`: \c"

$each_server/autostart || ret=$rc_failed

echo "$ret"

fi

done

fi

fi

;;

stop_msg)

echo "Sun ONE Web Server $S1WS_VERSION stopping ($S1WS_HOME)"

;;

stop)

echo "Sun ONE Web Server $S1WS_VERSION stopping ($S1WS_HOME)"

if [ $SECINSTANCES_START = 1 ] ; then

for each_server in $SECURE_WEB_INSTANCES

do

reversed_list0="$each_server $reversed_list0"

done

for each_server in $reversed_list0

do

if [ -d $each_server ]; then

echo" `basename $each_server`: \c "

$each_server/stop || ret=$rc_failed

echo "$ret"

fi

done

fi

for each_server in $WEB_INSTANCES

do

reversed_list1="$each_server $reversed_list1"

done

for each_server in $reversed_list1

do

if [ -d $each_server ]; then

echo" `basename $each_server`: \c "

$each_server/stop || ret=$rc_failed

echo "$ret"

fi

done

;;

*)

echo "Usage: $0 {start|stop}"

exit 1

;;

esac

# Inform the caller not only verbosely and set an exit status.

test "$ret" = "$rc_success" || exit 1

exit 0

###########################################################

copy this into a file and and save

copy the file into /etc/init.d directory

now create softlinks into the rc3.d for startup and rc0.d for stop.

ln -s /etc/init.d/webserver /etc/rc3.d/S95Webserver

ln -s /etc/init.d/webserver /etc/rc2.d/S05Webserver

Replace the cariables in the script with appropriate paths.

Thanks

Jo

activexperta at 2007-7-11 23:44:12 > top of Java-index,Web & Directory Servers,Web Servers...