Installation configuration for Tomcat under Linux
One. Download and install the corresponding JDK and configure the Java environment.
Website:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u26-download-400750.html
Download the JDK and put it into the/usr/local directory:
[[Email protected] ~] #chmod 755 Jdk-6u5-linux-x64.bin
[Email protected] ~]#./jdk-6u5-linux-x64.bin
[[Email protected] ~] #mv jdk1.6.0_05/usr/local
Establishing a JDK soft connection under/usr/local/facilitates later version upgrades:
[Email protected] ~]# ln-s/usr/local/jdk1.6.0_05//usr/local/jdk
Java_home=/usr/local/jdk1.6.0_05
Path= $PATH: $JAVA _bin
Export Java_home java_bin PATH CLASSPATH
Save exit
[Email protected] ~]source/etc/profile
See if the Java environment variable is in effect
[Email protected] ~]# java-version
Java Version "1.6.0_05"
Java (TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot (TM) 64-bit Server VM (build 10.0-b19, Mixed mode)
Test success
two. Download install tomcat(http://tomcat.apache.org/)
[Email protected] ~]# Unzip Apache-tomcat-6.0.30.zip
[Email protected] ~]# MV apache-tomcat-6.0.30//usr/local/
[Email protected] ~]cd/usr/local/
[Email protected] local]# ln-s/usr/local/apache-tomcat-6.0.30//usr/local/tomcat
[Email protected] local]# CD tomcat/bin/
[[email protected] bin] #ls
[[email protected] bin] #vim catalina.sh
Add the following content:
[[email protected] tomcat]# /usr/local/tomcat/bin/catalina.sh start
Using catalina_base:/usr/local/apache-tomcat-6.0.30/
Using Catalina_home:/usr/local/apache-tomcat-6.0.30/
Using Jre_home:/usr/local/jdk1.6.0_05
Using CLASSPATH:/usr/local/apache-tomcat-6.0.30//bin/bootstrap.jar
[Email protected] logs]# cd/usr/local/tomcat/logs/
[Email protected] logs]# tail-f catalina.out
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
At Java.lang.reflect.Method.invoke (method.java:597)
At Org.apache.catalina.startup.Bootstrap.start (bootstrap.java:289)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:414)
Jul 4, 11:06:57 AM org.apache.coyote.http11.Http11Protocol Pause
Info:pausing Coyote http/1.1 on http-8080
Jul 4, 11:06:58 AM org.apache.catalina.core.StandardService stop
Info:stopping Service Catalina
Jul 4, 11:06:58 AM Org.apache.coyote.http11.Http11Protocol destroy
Info:stopping Coyote http/1.1 on http-8080
Four Enter in the browser
http://localhost:8080/(if not native, enter the corresponding IP address)
Test appears when Tomcat page is tested successfully
Configuring Tomcat in Linux