First, install JDK, tomcat
1. Unzip the JDK package (address: http://www.oracle.com/technetwork/java/javase/downloads/index.html)
Run TAR-XZVPF jkd-7u80-linux-x64.gz
Set Java_home
VI ~/.bash_profile
Add Java_home variable
Export java_home=/usr/local/odrive/jdk1.7.0_80
Path= $JAVA _home/bin: $PATH: $HOME/bin
Save, enter:
CD ~
source. bash_profile
View Java_home
Java-version
2. Unpack the installation package (: http://tomcat.apache.org/)
Run tar-zxvf apache-tomcat-2.6.32.tar.gz
View version:
To start Tomcat:
Second, the test
Open Browser: Enter ip+ port number (default 8080)
Port number Change Address:
In Server.xml:
Clicking on the "status, Tomcat Manager" of Tomcat on your browser will prompt for your password:
The place where the account password was changed is%home/conf under TOMCAT-USERS.XM.
At this point, TOMCAT6 has been successfully deployed on Linux.
Three, the catalogue introduction
Tomcat's directory structure
bin//Command script file to store tomcat
conf//Storage of various configuration files for Tomcat server, mostly Server.xml
Lib//store Tomcat Server support Jar package
logs//storing log files
Temp//Storing temporary files
webapps//web application directory, external access to Web Resources storage directory
Working directory of work//tomcat
Directory structure for Web Apps
WebApp--The directory where the Web application resides
|---html, JSP, CSS, JS files, etc.-these files are generally in the root directory of the Web application, the files under the root directory can be directly accessed by the outside world.
|---web-inf directory-java classes, JAR packages, Web configuration files exist in this directory, the outside world is not directly accessible, the WEB server is responsible for the call.
|---Classes Directory--Java class
|---lib directory--the jar package required for Java classes to run
|---web. xml file--configuration file
Installation and use of Linux under Tomcat-6