Tomcat is a free and open-source Serlvet container. It is a core project of the Jakarta project of the Apache Foundation, developed by Apache, Sun, and other companies and individuals. With Sun's participation and support, the latest Servlet and Jsp specifications can always be reflected in Tomcat.
Tomcat is a solid and independent Web server and Servlet Container. However, its Web server functions are not as complete as many more sound Web servers, such as Apache Web servers (for example, tomcat does not have many selective modules ). However, Tomcat is a free open-source software, and many experts are committed to its development.
Install j2sdk (Java 2 Software Development Kit), that is, JDK, before installing Tomcat.
1. perform the following steps to install JDK:
1) download j2sdk, such as jdk-6u1-linux-i586-rpm.bin
2) in the terminal, go to the directory where the jdk-6u1-linux-i586-rpm.bin is located, enter the command chmod + 755 jdk-6u1-linux-i586-rpm.bin, and add the execution permission.
3) execute the command./jdk-6u1-linux-i586-rpm.bin to generate a jdk-6u1-linux-i586.rpm file.
4) execute the command chmod + 755 jdk-6u1-linux-i586.rpm to add the execution permission to the jdk-6u1-linux-i586.rpm.
5) execute command rpm-ivh jdk-6u1-linux-i586.rpm to install jdk.
6) The installation interface displays the authorization protocol. Press Enter to accept the protocol and install jdk in/usr/java/jdk1.6.0 _ 01.
7) set the environment variables and add the following content to/etc/profile (you can use vi to edit the profile ):
JAVA_HOME =/usr/java/jdk1.6.0 _ 01
CLASSPATH = $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib
PATH = $ PATH: $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin
Export path classpath JAVA_HOME
8) run the java-version command on the terminal. If jdk version is jdk1.6.0 _ 01, the jdk has been successfully installed.
2. install Tomcat
1. Download apache-tomcat-6.0.10.tar.gz
2) tar-zxvf apache-tomcat-6.0.10.tar.gz // unzip
3) cp-R apache-tomcat-6.0.10/usr/local/tomcat // copy apache-tomcat-6.0.10 to/usr/local/and rename it tomcat
4)/usr/local/tomcat/bin/startup. sh // start tomcat
Display Using CATALINA_BASE:/usr/local/tomcat
Using CATALINA_HOME:/usr/local/tomcat
Using CATALINA_TEMDIR:/usr/local/tomcat/temp
Using JAVA_HOME:/usr/java/jdk1.6.0 _ 01
Now That tomcat has been installed, visit http: // localhost: 8080 in the browser. The default tomcat page appears, indicating that the installation is successful.