(Formerly) cenos Linux tomcat installation and configuration

Source: Internet
Author: User

Cenos Linux tomcat installation and configuration
I. Tomcat
My next is apache-tomcat-6.0.36.tar.gz.

Ii. Installation
1. Extract
# Tar-zxvf apache-tomcat-6.0.36.tar.gz
2. copy to the folder I want to put
# Cp-r APACHE-Tomcat-6.0.36/opt/tomcat
3. Delete useless folders in Tomat
# Cd/opt/tomcat/webapps
# Rm-RF Root
# Rm-RF Manager
# Rm-RF host-Manager
# Rm-RF examples
# Rm-RF docs
I think it's useless.

4. Prepare tomcat. My configuration file is as follows:

<?xml version='1.0' encoding='utf-8'?> <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">    <Connector port="8080" protocol="HTTP/1.1"                connectionTimeout="20000"                redirectPort="8443" />     <!-- Define an AJP 1.3 Connector on port 8009 -->    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />     <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">               <!--For clustering, please take a look at documentation at:          /docs/cluster-howto.html  (simple how to)          /docs/config/cluster.html (reference documentation) -->      <!--      <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">        <Context path="" docBase="/opt/www" debug="0" />      </Host>    </Engine>  </Service></Server>


5. start Tomcat

#/Opt/tomcat/bin/startup. Sh

Using catalina_base:/opt/tomcat

Using catalina_home:/opt/tomcat

Using catalina_tmpdir:/opt/tomcat/temp

Using jre_home:/usr

Using classpath:/opt/tomcat/bin/Bootstrap. Jar

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.