`

Apache-Tomcat(工作环境/项目部署还交)

阅读更多
引用




启动



set CATALINA_HOME=D:\web\apache-tomcat-6.0.29-windows-x86\apache-tomcat-6.0.29_3

set CATALINA_BASE=%CATALINA_HOME%\instances\demo2

D:\web\apache-tomcat-6.0.29-windows-x86\apache-tomcat-6.0.29_3\bin\startup.bat




server.xml
<?xml version='1.0' encoding='utf-8'?>
<!--
  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.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8005" shutdown="SHUTDOWN">

  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container", 
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">
  
    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" 
        maxThreads="150" minSpareThreads="4"/>
    -->
    
    
    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />
    -->           
    <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the JSSE configuration, when using APR, the 
         connector should be using the OpenSSL style configuration
         described in the APR documentation -->
    <!--
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">         
    --> 
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!-- (SimpleTcpCluster)-->   
       <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
             

      <!-- The request dumper valve dumps useful debugging information about
           the request and response data received and sent by Tomcat.
           Documentation at: /docs/config/valve.html -->
      <!--
      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
      -->

      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>

      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        -->

      </Host>
    </Engine>
  </Service>
</Server>

分享到:
评论

相关推荐

    apache-tomcat-7.0.88.tar.gz

    在Linux服务器上部署`apache-tomcat-7.0.88.tar.gz`,首先需要了解Linux的基本操作,包括解压文件、配置环境变量、启动和管理服务等。以下是详细步骤: 1. **下载与解压**: 使用`wget`命令从官方源下载该版本的...

    apache-tomcat-8.5.83.tar.gz

    - Tomcat由Apache Software Foundation维护,是Apache Jakarta项目的一部分,它提供了纯Java的HTTP服务器环境,用于运行Java Web应用程序。 2. **版本8.5**: - Tomcat 8.5是Tomcat的一个主要版本,它引入了对...

    最新版linux apache-tomcat-9.0.37.tar.gz

    在Linux环境下,Apache Tomcat提供了高效且轻量级的Web服务解决方案。 标题中的"最新版linux apache-tomcat-9.0.37.tar.gz"指的是适用于Linux操作系统的Apache Tomcat服务器的9.0.37版本,该版本被打包成了tar.gz...

    apache-tomcat-9.0.27-apache-tomcat-10.0.27.zip

    总的来说,"apache-tomcat-9.0.27-apache-tomcat-10.0.27.zip"包含的两个版本提供了不同的功能和适应性,开发者可以根据项目需求和环境选择合适的版本。无论是9.0.27还是10.0.27,了解其特性、兼容性以及最佳实践都...

    apache-tomcat-9.0.2.tar.gz

    总结来说,Apache Tomcat 9.0.2在Linux系统上的部署涉及解压、移动文件、设置权限、配置环境变量以及启动和管理服务。这是一个基础的Web服务器搭建过程,适合开发者和系统管理员学习和实践。通过熟悉这些步骤,你...

    apache-tomcat-7.0.70.tar.gz

    Apache Tomcat是一个开源的软件应用服务器,主要用于部署和运行Java Servlet和JavaServer Pages(JSP)应用程序。在本例中,我们关注的是`apache-tomcat-7.0.70.tar.gz`文件,这是一个针对Linux操作系统的Tomcat ...

    最新版linux apache-tomcat-8.5.58.tar.gz

    它是Apache软件基金会的项目之一,且在Linux环境中广泛使用。最新的版本是8.5.58,这个版本修复了若干安全漏洞和性能问题,提升了系统的稳定性和安全性。 在Linux环境下安装Apache Tomcat 8.5.58的步骤如下: 1. *...

    apache-tomcat-7.0.26 32bit/64bit 安装版本

    Apache Tomcat 7.0.26 是一个广泛使用的开源软件,它是一个符合Java Servlet和JavaServer Pages(JSP)规范的应用服务器,主要用于部署和运行Java Web应用程序。这个压缩包包含了32位和64位的安装版本,适用于不同的...

    apache-tomcat-7.0.42

    Apache Tomcat 7.0.42 是一个广泛使用的开源软件,它是一个符合Java Servlet和JavaServer Pages(JSP)规范的应用服务器,主要用于部署和运行Java Web应用程序。这个版本是Tomcat服务器的一个重要里程碑,提供了许多...

    apache-tomcat-8.0.zip

    Apache Tomcat是一款开源的...以上就是关于Apache Tomcat 8.0.9版本的一些关键知识点,这个版本的Tomcat不仅提供了一个稳定且高效的运行环境,还为开发者提供了丰富的配置选项和扩展能力,是Java Web应用的理想选择。

    apache-tomcat-6.0.10.tar.gz_apache_apache安装包_tomcat6 un_unix tom

    Apache Tomcat是一款开源的Java Servlet容器,主要用于部署和运行Java Web应用程序,包括JSP和Servlet。这个"apache-tomcat-6.0.10.tar.gz"是Apache Tomcat的6.0.10版本,适用于Unix类操作系统,如Linux或macOS。此...

    apache-tomcat-8.5.27.tar.gz

    Apache Tomcat是Apache软件基金会的项目之一,它实现了Java EE的Web部分,特别是Servlet和JSP规范。 首先,让我们深入了解Apache Tomcat的核心功能和结构。Tomcat作为一个轻量级的Web服务器,主要负责处理HTTP请求...

    apache-tomcat-8.5.47.tar.gz

    Apache Tomcat 是一个开源的Java Servlet容器,它实现了Java EE中的...总的来说,"apache-tomcat-8.5.47.tar.gz"是部署Java Web应用的关键工具,理解其工作原理和管理方式对于任何Java开发者或系统管理员都至关重要。

    apache-tomcat-6.0.18

    Tomcat是Apache软件基金会的Jakarta项目的一部分,以其轻量级、高效和稳定性而著称。 在JAVA Web应用开发中,Tomcat扮演了服务器的角色,它允许开发者将静态HTML、CSS、JavaScript文件与动态Java代码结合在一起,...

    apache-tomcat-8.5.32-windows-x64安装版

    Apache Tomcat 8.5.32 是一个广泛使用的开源软件,它是一个Java Servlet容器,专为部署Java Web应用程序而设计。此版本是专为64位Windows操作系统编译的,确保在这样的平台上运行时的稳定性和性能。下面将详细介绍...

    apache-tomcat-7.0.8 32bit/64bit 安装版

    它是由Apache Software Foundation维护的Tomcat项目的一部分,专注于提供一个轻量级、高性能的Java应用服务器,用于部署和运行基于Java的Web应用程序。 在安装Apache Tomcat 7.0.8之前,你需要确保你的系统已经安装...

    apache-tomcat-5.5.17-embed.tar.gz

    在本案例中,我们讨论的是`apache-tomcat-5.5.17-embed.tar.gz`,这是一个精简版的Tomcat服务器,特别设计为可嵌入到其他应用程序中,允许开发者将Tomcat的功能直接集成到他们的程序中,无需单独部署和管理一个完整...

    最新版linux apache-tomcat-8.5.70.tar.gz

    Apache Tomcat是一款开源的Java Servlet容器,主要用于部署和运行Java Web应用程序。它是Apache软件基金会的项目之一,专注于实现Java EE的Web部分,特别是Servlet和JSP规范。在本例中,我们讨论的是针对Linux操作...

    tomcat8 apache-tomcat-8.0.26.tar.gz

    Apache Tomcat 8.0.26 是一个广泛使用的开源软件,它是一个Java Servlet容器,专为部署Java Web应用程序而设计。Tomcat是Apache软件基金会的Jakarta项目的一部分,遵循Apache 2.0许可证,因此它是免费且开源的。这个...

    apache-tomcat-7.0.34

    这个压缩包包含了运行Tomcat所需的所有核心组件和配置文件,使得用户可以快速地在本地环境中部署和运行Java Web应用。 首先,我们来详细了解一下压缩包中的各个文件和目录: 1. **LICENSE** 和 **NOTICE**:这两个...

Global site tag (gtag.js) - Google Analytics