Tomcat配置

 本文内容

  1. 介绍
  2. Windows
  3. UNIX daemon

 

 

1.介绍

首选看Tomcat目录下的RUNNING.TXT

 

2.Windows平台下

可以选择下载windows installer安装文件

安装成Service

Java, 不用多说了

 

 

3. UNIX DAEMON

Tomcat can be run as a daemon using the jsvc tool from the commons-daemon project.

 

前提条件JDK已经安装好,已设置好JAVA_HOME环境变量

下载commons-daemon-native.tar.gz

执行以下命令

cd $CATALINA_HOME/bin

    tar xvfz commons-daemon-native.tar.gz

    cd commons-daemon-1.0.x-native-src/unix

    ./configure

    make

    cp jsvc ../..

    cd ../..

 

 

用如下命令启动

CATALINA_BASE=$CATALINA_HOME
    cd $CATALINA_HOME
    ./bin/jsvc \
        -classpath $CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar \
        -outfile $CATALINA_BASE/logs/catalina.out \
        -errfile $CATALINA_BASE/logs/catalina.err \
        -Dcatalina.home=$CATALINA_HOME \
        -Dcatalina.base=$CATALINA_BASE \
        -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
        -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \
        org.apache.catalina.startup.Bootstrap

 其他参数参见#jsvc --help