Hi Chris.

I use Tomcat 7 on Centos. I compile JSVC to start tomcat and use the old 
startup script. I just need to add the tomcat-juli.jar to the script.
Here is the script. To compile jsvc, cd into tomcat/bin directory and 
untar the commons-daemon-native.tar.gz file. Cd into 
commons-daemon-1.0.15-native-src/unix and run ./configure (you must have 
a gcc compiler installed). On success, run make and it will create a 
jsvc executable. I then move the executable into tomcat/bin directory.

Hope that helps.

*******************************************************************************
#!/bin/sh
##############################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##############################################################################
#
# Small shell script to show how to start/stop Tomcat using jsvc
# If you want to have Tomcat running on port 80 please modify the server.xml
# file:
#
#    <!-- Define a non-SSL HTTP/1.1 Connector on port 80 -->
#    <Connector className="org.apache.catalina.connector.http.HttpConnector"
#               port="80" minProcessors="5" maxProcessors="75"
#               enableLookups="true" redirectPort="8443"
#               acceptCount="10" debug="0" connectionTimeout="60000"/>
#
# That is for Tomcat-5.0.x (Apache Tomcat/5.0)
#
# Adapt the following lines to your configuration
JAVA_HOME=/data/java
CATALINA_HOME=/data/tomcat
DAEMON_HOME=$CATALINA_HOME/bin
TOMCAT_USER=dspace

# for multi instances adapt those lines.
TMP_DIR=/var/tmp
PID_FILE=/var/run/jsvc.pid
CATALINA_BASE=/data/tomcat

CATALINA_OPTS="-Djava.library.path=/home/jfclere/jakarta-tomcat-connectors/jni/native/.libs
 
-Xmx6144M -Xms4096M -Dfile.encoding=UTF-8 -XX:+UseConcMarkSweepGC 
-XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled 
-XX:MaxPermSize=2048M "
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/tomcat-juli.jar:\
$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
   start)
     #
     # Start Tomcat
     #
     $DAEMON_HOME/jsvc $JSVC_OPTS \
     -user $TOMCAT_USER \
     -home $JAVA_HOME \
     -Dcatalina.home=$CATALINA_HOME \
     -Dcatalina.base=$CATALINA_BASE \
     -Djava.io.tmpdir=$TMP_DIR \
     -wait 10 \
     -pidfile $PID_FILE \
     -outfile $CATALINA_HOME/logs/catalina.out \
     -errfile '&1' \
     $CATALINA_OPTS \
     -cp $CLASSPATH \
     org.apache.catalina.startup.Bootstrap
     #
     # To get a verbose JVM
    #-verbose \
     # To get a debug of jsvc.
     #-debug \
     exit $?
     ;;

   stop)
     #
     # Stop Tomcat
     #
     $DAEMON_HOME/jsvc $JSVC_OPTS \
     -stop \
     -pidfile $PID_FILE \
     org.apache.catalina.startup.Bootstrap
     exit $?
     ;;

   *)
     echo "Usage tomcat.sh start/stop"
     exit 1;;
esac

*******************************************************************************
>> I've been able to find /etc/init.d scripts for tomcat 7, but they run
>> tomcat as root and dspace needs tomcat to run as the dspace user.
>>
>> Is the necessary script documented somewhere?  If it is, I'm not finding
>> it.
>>
>> Thanks,
>> Chris
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for
>> all
>> things parallel software development, from weekly thought leadership blogs
>> to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> DSpace-tech mailing list
>> DSpace-tech@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>> List Etiquette:
>> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>>
>


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to