- 论坛徽章:
- 0
|
我也看过其他类似的配置文件,,可我这个好像没有什么不对的地方。。你帮我看看
我的步骤如下,你看看有什么不对
#tar zxvf jsvc.tar.gz
#cd jsvc-src
#sh support/buildconf.sh
#chmod -R +x configure
#./configure --with-java=/ usr/java/jdk1.6.0_06
..............
#make(这里输入后出现以下错误)
make -C native all
make[1]: Entering directory `/opt/tomcat/bin/jsvc-src/native'
gcc -ldl -lpthread jsvc-unix.o libservice.a -o ../jsvc
make[1]: Leaving directory `/opt/tomcat/bin/jsvc-src/native'
(请问这个是什么意思,是什么原因引起的,如何解决)
我做完以上的,把../tomcat/bin/jsvc-src/native目录下的tomcat5.sh拷贝到/etc/init.d/下面修改名字为tomcatd
下面就是我修改的内容
#!/bin/sh
##############################################################################
#
# Copyright 2004 The Apache Software Foundation.
#
# Licensed 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=/usr/java/jdk1.6.0_06(这个是我JDK的安装目录)
CATALINA_HOME=/opt/tomcat(这个是我TOMCAT的安装目录)
DAEMON_HOME=$CATALINA_HOME/bin(jsvc 安装目录)
TOMCAT_USER=tomcat
# for multi instances adapt those lines.
TMP_DIR=/opt/tomcat/tmp
PID_FILE=/var/run/jsvc.pid
CATALINA_BASE=/opt/tomcat
CATALINA_OPTS="-Djava.library.path=/home/jfclere/jakarta-tomcat-connectors/jni/native/.libs"
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar
case "$1" in
start)
#
# Start Tomcat
#
$DAEMON_HOME/jsvc-src/jsvc \
-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-src/jsvc \
-stop \
-pidfile $PID_FILE \
org.apache.catalina.startup.Bootstrap
exit $?
;;
*)
echo "Usage tomcat.sh start/stop"
exit 1;;
esac
修改完以上内容后,我运行#chkconfig --add tomcatd 他就说不支持chkconfig服务。。。
[ 本帖最后由 demoyy 于 2008-8-21 00:38 编辑 ] |
|