1. Download apache-tomcat-6.0.35.tar.gz
2. # tar-zxvf apache-tomcat-6.0.35.tar.gz; // unzip
3. # cp-r APACHE-Tomcat-6.0.35/usr/tomcat; // copy to/usr/and rename it Tomcat
4. #/usr/tomcat/bin/startup. Sh; // start Tomcat
Display
Using catalina_base:/usr/tomcat
Using catalina_home:/usr/tomcat
Using catalina_tmpdir:/usr/tomcat/temp
Using jre_home:/usr/Java/jdk1.7.0 _ 04
Using classpath:/usr/tomcat/bin/Bootstrap. Jar
Now That tomcat has been installed, visit http: // localhost: 8080 in the browser. The default Tomcat page appears, indicating that the installation is successful.
5. ##/usr/tomcat/bin/shutdown. Sh; // close Tomcat
Display
Using catalina_base:/usr/tomcat
Using catalina_home:/usr/tomcat
Using catalina_tmpdir:/usr/tomcat/temp
Using jre_home:/usr/Java/jdk1.7.0 _ 04
Using classpath:/usr/tomcat/bin/Bootstrap. Jar
You can also use scripts for automatic installation:
Put install_tomcat6.shin the same directory as apache-tomcat-6.0.36.tar.gz.
#! /Bin/bash
File = "apache-tomcat-6.0.36.tar.gz"
Prefix = "Apache-Tomcat-6.0.36"
Install_path = "/usr/tomcat"
Tar-zvxf implements prefix#.tar.gz
If [! -D $ {install_path}]; then
Mkdir-p $ {install_path}
Echo "[info] mkdir $ {install_path }"
Fi
CP-r $ {prefix }$ {install_path}
Echo "[info] $ {prefix} has installed :)"
$ {Install_path}/$ {prefix}/bin/startup. Sh
Echo "[info] $ {prefix} is running ....."
Rpm-Q Firefox
Firefox "http: // localhost: 8080"