<br><br><div><span class="gmail_quote">On 7/17/06, <b class="gmail_sendername">Horchler, Joerg</b> <<a href="mailto:joerg.horchler@coremedia.com">joerg.horchler@coremedia.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Do you have any logfile output? First check whether the environment<br>(JAVA_HOME for example) is set before calling<br>/usr/apache-tomcat-5.5.17/bin/startup.sh. For example<br><br><<<< snip<br>#!/bin/bash<br>
export JAVA_HOME=/opt/jdk1.5.0_05_x86_64<br>bin/startup.sh<br>>>>> snip<br><br>-----Ursprüngliche Nachricht-----<br>Von: <a href="mailto:centos-bounces@centos.org">centos-bounces@centos.org</a> [mailto:<a href="mailto:centos-bounces@centos.org">
centos-bounces@centos.org</a>] Im Auftrag<br>von Mark Quitoriano<br>Gesendet: Montag, 17. Juli 2006 10:22<br>An: CentOS mailing list<br>Betreff: [CentOS] executable on /etc/rc.local doesn't start<br><br>Hi<br><br>i installed apache tomcat on my server and put the startup on /etc/rc.local
<br>file so it will boot up everytime i restarted my server. But it never booted<br>up i still need to run it manually what am i missing?<br><br>here's my rc.local<br>#!/bin/sh<br>#<br># This script will be executed *after* all the other init scripts.
<br># You can put your own initialization stuff in here if you don't # want to<br>do the full Sys V style init stuff.<br><br><br>ntpdate -u <a href="http://18.145.0.30">18.145.0.30</a><br><br>/usr/local/sbin/apache-tomcat-start
<br><br>touch /var/lock/subsys/local</blockquote><div><br>Hey,<br><br>Somebody has written the startup script for tomcat 4.<br><pre>><i> -----START CUT-----<br></i>><i><br></i>><i> #!/bin/sh<br></i>><i> #<br></i>
><i> # Startup script for the Jakarta Tomcat Java Servlets and JSP server<br></i>><i> #<br></i>><i> # chkconfig: - 85 15<br></i>><i> # description: Jakarta Tomcat Java Servlets and JSP server<br></i>><i> # processname: tomcat
<br></i>><i> # pidfile: /var/run/tomcat.pid<br></i>><i> # config:<br></i>><i><br></i>><i> # Source function library.<br></i>><i> . /etc/rc.d/init.d/functions<br></i>><i><br></i>><i> # Source networking configuration.
<br></i>><i> . /etc/sysconfig/network<br></i>><i><br></i>><i> # Check that networking is up.<br></i>><i> [ ${NETWORKING} = "no" ] && exit 0# Set Tomcat environment.<br></i>><i> export JAVA_HOME=/usr/local/java/j2sdk
<br></i>><i> export <br></i>><i> CLASSPATH=.:/usr/local/java/j2sdk/lib/tools.jar:/usr/local/java/j2re/lib/rt.jar<br></i>><i> export CATALINA_HOME=/usr/local/tomcat<br></i>><i> export CATALINA_OPTS="-Dbuild.compiler.emacs=true
"<br></i>><i> export PATH=/usr/local/java/j2sdk/bin:/usr/local/local/j2re/bin:$PATH<br></i>><i><br></i>><i> [ -f /usr/local/tomcat/bin/startup.sh ] || exit 0<br></i>><i> [ -f /usr/local/tomcat/bin/shutdown.sh ] || exit 0
<br></i>><i><br></i>><i> export PATH=$PATH:/usr/bin:/usr/local/bin<br></i>><i><br></i>><i> # See how we were called.<br></i>><i> case "$1" in<br></i>><i> start)<br></i>><i> # Start daemon.<br>
</i>><i> echo -n "Starting Tomcat: "<br></i>><i> /usr/local/tomcat/bin/startup.sh<br></i>><i> RETVAL=$?<br></i>><i> echo<br></i>><i> [ $RETVAL = 0 ] && touch /var/lock/subsys/tomcat<br></i>
><i> ;;<br></i>><i> stop)<br></i>><i> # Stop daemons.<br></i>><i> echo -n "Shutting down Tomcat: "<br></i>><i> /usr/local/tomcat/bin/shutdown.sh<br></i>><i> RETVAL=$?<br></i>><i> echo<br></i>
><i> [ $RETVAL = 0 ] && rm -f /var/lock/subsys/tomcat<br></i>><i> ;;<br></i>><i> restart)<br></i>><i> $0 stop<br></i>><i> $0 start<br></i>><i> ;;<br></i>><i> condrestart)<br></i>><i> [ -e /var/lock/subsys/tomcat ] && $0 restart
<br></i>><i> ;;<br></i>><i> status)<br></i>><i> status tomcat<br></i>><i> ;;<br></i>><i> *)<br></i>><i> echo "Usage: $0 {start|stop|restart|status}"<br></i>><i> exit 1<br></i>><i> esac<br>
</i>><i><br></i>><i> exit 0<br></i>><i><br></i>><i> -----END CUT----- <br></i>><i><br></i>><i> chown root:root /etc/rc.d/init.d/tomcat<br></i>><i><br></i>><i> chmod 755 /etc/rc.d/init.d/tomcat<br></i>
><i><br></i>><i> chkconfig --add tomcat<br></i>><i><br></i>><i> chkconfig tomcat on<br></i>><i><br></i>><i> Go to: <a href="http://localhost:8080/">http://localhost:8080</a><br></i>><i><br></i>><i>
Note: It will take about 15 seconds to pull up.<br></i>></pre> </div><br>More informatio is available at <br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<a href="http://lists.centos.org/pipermail/centos/2005-October/054306.html">http://lists.centos.org/pipermail/centos/2005-October/054306.html</a><br><br>Change as per your needs.</blockquote><div><br><br>Regards<br><br>Ankush Grover
<br></div><br></div><br>