Install Tomcat 6.0.29 in CentOS

Source: Internet
Author: User
Tags nginx reverse proxy

Install the Tomcat 6.0.29 compressed package

The Lnux operating system is CentOS.

Load Balancing between Apache and multiple Tomcat clusters in Linux

Nginx Tomcat Cluster load balancing solution notes

Instance details Tomcat component installation + Nginx reverse proxy Tomcat + Apache use mod_jk and mod_proxy Reverse Proxy and load balancing

Build an Apache + Tomcat environment (JK deployment process)

In-depth analysis of Tomcat PDF

1. install Tomcat
Decompress apache-tomcat-6.0.29.zip to any directory with permissions, such as/home/its/apache-tomcat-6.0.29.
 
2. Download and install JDK (jdk1.6.0 _ 24-linux-i586.bin ):
[Root @ mysqlvm2 ~] #./Jdk-6u45-linux-x64-rpm.bin
-Bash:./jdk-6u45-linux-x64-rpm.bin :?.. Juan .?

3. You need to modify the executable permission.
Chmod u + x jdk-6u45-linux-x64-rpm.bin

4. Then run the installation
[Root @ mysqlvm2 ~] #./Jdk-6u45-linux-x64-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu ).
Inflating: jdk-6u45-linux-amd64.rpm
Inflating: sun-javadb-common-10.6.2-1.1.i386.rpm
Inflating: sun-javadb-core-10.6.2-1.1.i386.rpm
Inflating: sun-javadb-client-10.6.2-1.1.i386.rpm
Inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm
Inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm
Inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm
Preparing... ######################################## ### [100%]
1: jdk ####################################### #### [100%]
Unpacking JAR files...
Rt. jar...
Jsse. jar...
Charsets. jar...
Tools. jar...
Localedata. jar...
Plugin. jar...
Javaws. jar...
Deploy. jar...
Installing JavaDB
Preparing... ######################################## ### [100%]
1: sun-javadb-common ################################### ####### [1, 17%]
2: sun-javadb-core ################################### ####### [1, 33%]
3: sun-javadb-client ################################### ####### [1, 50%]
4: sun-javadb-demo ################################### ####### [1, 67%]
5: sun-javadb-docs ################################### ####### [1, 83%]
6: sun-javadb-javadoc ################################### ####### [1, 100%]
 
Done.
[Root @ mysqlvm2 ~] #

Set environment variables: vi ~ /. Bash_profile:
JAVA_HOME =/usr/java/jdk1.6.0 _ 45/# required
PATH = $ PATH: $ HOME/bin
PATH = $ JAVA_HOME/bin: $ PATH # required
CLASS_PATH = $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export JAVA_HOME # required
Export CLASS_PATH
Export TOMCAT_HOME =/usr/tomcat-6.0.37
Export CATALINA_HOME =/usr/tomcat-6.0.37
Export PATH
 
Note: # The part is required, and other settings are not required.
 
3. start Tomcat
# Cd/usr/tomcat-6.0.37/bin
#./Startup. sh
[Root @ mysqlvm2 tomcat-6.0.37] # cd/usr/tomcat-6.0.37/bin
[Root @ mysqlvm2 bin] #./startup. sh
Using CATALINA_BASE:/usr/tomcat-6.0.37
Using CATALINA_HOME:/usr/tomcat-6.0.37
Using CATALINA_TMPDIR:/usr/tomcat-6.0.37/temp
Using JRE_HOME:/usr
Using CLASSPATH:/usr/tomcat-6.0.37/bin/bootstrap. jar
[Root @ mysqlvm2 bin] # ps-eaf | grep tomcat
Root 9092 1 47 00:00:04 pts/1/usr/bin/java-Djava. util. logging. config. file =/usr/tomcat-6.0.37/conf/logging. properties-Djava. util. logging. manager = org. apache. juli. classLoaderLogManager-Xms1024m-Xmx1024m-Xss1024K-XX: PermSize = 256 m-XX: MaxPermSize = 512 m-Dcom. sun. management. jmxremote-Dcom. sun. management. jmxremote. port = 1090-Dcom. sun. management. jmxremote. ssl = false-Dcom. sun. management. jmxremote. authenticate = false-Djava. endorsed. dirs =/usr/tomcat-6.0.37/endorsed-classpath/usr/tomcat-6.0.37/bin/bootstrap. jar-Dcatalina. base =/usr/tomcat-6.0.37-Dcatalina. home =/usr/tomcat-6.0.37-Djava. io. tmpdir =/usr/tomcat-6.0.37/temp org. apache. catalina. startup. bootstrap start
Root 9114 8010 0 00:00:00 pts/1 grep tomcat

If the following error is reported:
The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program
 
Solution:
Add the following executable permissions for all. sh files in/usr/tomcat-6.0.37/bin:
$ Cd/usr/tomcat-6.0.37/bin
$ Chmod + x *. sh
 
Restart Tomcat.

Tomcat details: click here
Tomcat: click here

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.