Tomcat is a core project of the Apache Software Foundation (Apache Software Foundation) Jakarta Project, developed by Apache, Sun, and other companies and individuals. With Sun's involvement and support, the latest servlet and JSP specifications are always reflected in Tomcat, and Tomcat 5 supports the latest servlet 2.4 and JSP 2.0 specifications. Because of the advanced Tomcat technology, stable performance, and free, so deeply loved by Java enthusiasts and have been recognized by some software developers, become the most popular Web application server.
Tomcat server is a free open source Web application server, belongs to the lightweight application server, in small and medium-sized systems and concurrent access users are not widely used, is the first choice to develop and debug JSP programs. For a beginner, it can be thought that when the Apache server is configured on a single machine, it can respond to requests for access to the HTML (one application under the standard Universal Markup Language) page. The tomcat part is actually an extension of the Apache server, but it runs independently, so when you run Tomcat, it actually runs separately as a separate process from Apache.
1. Download and install Tomcat, based on the Apache protocol
Java and JSP run programs need to use JDK
Install JDK, go to JDK website to download
Http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html
into the SRC directory
Cd/usr/local/src
wget http://download.oracle.com/otn-pub/java/jdk/8u112-b15-demos/jdk-8u112-linux-i586-demos.tar.gz
2. Extracting files
Tar zxvf jdk-8u112-linux-i586-demos.tar.gz
3. Move the extracted files to the/usr/local/
MV jdk1.8.0_112/usr/local/
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
4. Setting Environment variables
vim/etc/profile.d/java.sh
Write content
java_home=/usr/local/jdk1.8.0_112/
Java_bin=/usr/local/jdk1.8.0_112/bin
Jre_home=/usr/local/jdk1.8.0_112/jre
Path= $PATH:/usr/local/jdk1.8.0_112/bin:/usr/local/jdk1.8.0_112/jre/bin
classpath=/usr/local/jdk1.8.0_112/jre/lib:/usr/local/jdk1.8.0_112/lib:/usr/local/jdk1.8.0_112/jre/lib/ Charsets.jar
Export Java_home java_bin jre_home PATH CLASSPATH
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8B/51/wKioL1hJhL2zvn5ZAAAyQi6FQeY218.png-wh_500x0-wm_3 -wmp_4-s_2651278138.png "title=" 21.png "alt=" Wkiol1hjhl2zvn5zaaayqi6fqey218.png-wh_50 "/>
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang /zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
5. Initializing Environment variables
source/etc/profile.d/java.sh
6. Verify that it is successful
Java-version
Display as 1.7 version, indicating that the version is not healthy
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s2.51cto.com/wyfs02/m01/8b/54/wkiom1hjhm_rwlfoaaawbjxaosg870.png-wh_500x0-wm_3-wmp_4-s_4095478779.png "title = "22.png" alt= "Wkiom1hjhm_rwlfoaaawbjxaosg870.png-wh_50"/>
View version
Yum List |grep JDK
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s4.51cto.com/wyfs02/m02/8b/54/wkiom1hjhoeifuqsaaisslncgl0451.png-wh_500x0-wm_3-wmp_4-s_1160896780.png "title = "23.png" alt= "Wkiom1hjhoeifuqsaaisslncgl0451.png-wh_50"/>
Removing version 1.7
Yum-y Remove java-1.7.0-openjdk* java-1.6.0-openjdk*
7. Initializing Environment variables
SOURCE/ETC/PROFILE.D /java.sh
Check for success, display 1.8 version of the information
Java-version
Install JDK under Tomcat