You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kyle Brentnell <ky...@reuel.com> on 2004/02/27 04:28:55 UTC
Automatically starting Cocoon
Hello,
I am trying to have Cocoon automatically start when my linux box starts up.
I am using:
Cocoon 2.1.3
Tomcat ???
Apache 2.0.40
Linux RedHat8
All I can find in the docs/FAQs/etc are instructions for starting Tomcat
using tomcat.sh or catalina.sh. There are no tomcat.sh or catalina.sh files
on my system.
I am guessing that Tomcat is more hidden in version 2.1.3 of Cocoon.
Can someone explain how to autostart cocoon or point me to documentation
that will work for version 2.1.3.
BTW-Cocoon works great when I start it manually using "cocoon.sh servlet"
Thank you,
Kyle Brentnell
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Automatically starting Cocoon
Posted by Geoff Howard <co...@leverageweb.com>.
Kyle Brentnell wrote:
>Hello,
>
>I am trying to have Cocoon automatically start when my linux box starts up.
>
>I am using:
>Cocoon 2.1.3
>Tomcat ???
>Apache 2.0.40
>Linux RedHat8
>
>All I can find in the docs/FAQs/etc are instructions for starting Tomcat
>using tomcat.sh or catalina.sh. There are no tomcat.sh or catalina.sh files
>on my system.
>
>
...
>I am guessing that Tomcat is more hidden in version 2.1.3 of Cocoon.
>
>
Pretty hidden indeed! Tomcat isn't now and never was included in
Cocoon. A slimmed down version of Jetty was bundled sometime in 2.1 for
convenience of trying Cocoon out, but for production you'd want the full
version of Jetty or Tomcat, or something else.
Once Cocoon is installed in one of these containers, your question boils
down to how to start the servlet container on startup, and that comes to
placing or linking a start script in rc3.d as you would any other
startup bit on linux. The biggest issue is how to do so and start as
some user other than root. Someone may have a better suggestion but I
personally use a script (below) that basically does su - webuser tomcat.sh
HTH,
Geoff
#!/bin/sh
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
TOMCAT_HOME=/opt/tomcat
TOMCAT_OWNER=webuser
export JAVA_HOME=/opt/java
if [ ! -f $TOMCAT_HOME/bin/startup.sh -o ! -d $TOMCAT_HOME ]; then
echo "Tomcat startup: cannot start"
exit
fi
# See how we were called.
case "$1" in
start)
echo -n "Starting Tomcat: "
su - $TOMCAT_OWNER -c $TOMCAT_HOME/bin/startup.sh
echo
touch /var/lock/subsys/tomcat
;;
stop)
# Stop daemons.
echo -n "Shutting down Tomcat: "
su - $TOMCAT_OWNER -c $TOMCAT_HOME/bin/shutdown.sh
echo
rm -f /var/lock/subsys/tomcat
;;
restart)
$0 stop
$0 start
;;
status)
;;
*)
echo "Usage: tomcat {start|stop|restart|status}"
exit 1
esac
exit 0
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org