posts - 2, comments - 2, trackbacks - 0, articles - 23
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

tomcat文档阅读一:

Posted on 2012-02-29 15:30 齐纳尔多 阅读(250) 评论(0)  编辑  收藏 所属分类: 服务器(软件知识)

1.tomcat可以配置多个实例,可以为每一个实例定义一个$CATALINA_BASE
  如果tomcat只有一个$CATALINA_BASE 和$CATALINA_HOME 一样

  说明(网上资料):CATALINA_HOME是Tomcat的安装目录,CATALINA_BASE是Tomcat的工作目录。
    如果我们想要运行Tomcat的多个实例,但是不想安装多个Tomcat软件副本。
    那么我们可以配置多个工作目录,每个运行实例独占一个工作目录,但是共享同一个安装目录。
    Tomcat每个运行实例需要使用自己的conf、logs、temp、webapps、work和shared目录,
    因此CATALINA_BASE就指向这些目录。而其他目录主要包括了Tomcat的二进制文件和脚本,
    CATALINA_HOME就指向这些目录。
    如果我们希望再运行另一个Tomcat实例,那么我们可以建立一个目录,
    把conf、logs、temp、webapps、work和shared拷贝到该目录下,然后让CATALINA_BASE指向该目录即可

2.英语学习:There's nothing like scouring the web only to find out that the answer was right in front of you all along!
  就像搜索网页一样,在你面前的正确答案始终没有
3.
--unix Daemon--
Tomcat can be run as a daemon using the jsvc tool from the commons-daemon project
 ./configure --with-java=/usr/java
 命令脚本:

 Please note that you should use the GNU make (gmake) instead of the native BSD make on FreeBSD systems
 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 ../..

Tomcat can then be run as a daemon using the following commands.

cd $CATALINA_HOME
    ./bin/jsvc -cp ./bin/bootstrap.jar:./bin/tomcat-juli.jar \
        -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
        org.apache.catalina.startup.Bootstrap
You may also need to specify -jvm server if the JVM defaults to using a server VM rather than a client VM. This has been observed on OSX
(最好指定使用服务器虚拟机-Server JVM)

 jsvc可以加一些参数执行

4./etc/init.d 可以编辑使得tomcat自动启动


只有注册用户登录后才能发表评论。


网站导航: