Tomcat, resin for parsing jsps

Source: Internet
Author: User

First, Tomcat

1. Installing the JDK

[Email protected] ~]# cd/usr/local/src/[[Email protected]src]# wget http://Www.lishiming.net/data/attachment/forum/jdk-6u23-linux-i586.bin[Email protected] src]# chmod a+x jdk-6u23-linux-I586.bin[[email protected]src]#./jdk-6u23-linux-i586.bin//Unzip the filePress Enter toContinue.....//Click the Enter button[Email protected] src]# mv Jdk1.6.0_23/usr/local/[email protected] src]# vim/etc/ Profile//the file is added at the tailJava_home=/usr/local/jdk1.6.0_23/Java_bin=/usr/local/jdk1.6.0_23/Binjre_home=/usr/local/jdk1.6.0_23/Jrepath= $PATH:/usr/local/jdk1.6.0_23/bin:/usr/local/jdk1.6.0_23/jre/Binclasspath=/usr/local/jdk1.6.0_23/jre/lib:/usr/local/jdk1.6.0_23/lib:/usr/local/jdk1.6.0_23/jre/lib/charsets.jarexport java_home java_bin jre_home PATH classpath[[email protected] src]# source/etc/Profile [[email protected] src]# Java-version//if the following is displayed, the configuration is correct:Java version"1.6.0_23"Java (TM) SE Runtime Environment (build1.6.0_23-b05) Java HotSpot (TM) Client VM (Build19.0-b09, mixed mode, sharing)

2. Install Tomcat

[Email protected] ~]# cd/usr/local/src[[email protected] src]# wget http://www.lishiming.net/data/attachment/forum/apache-tomcat-7.0.14.tar.gz[Email protected] src]# tar zxvf apache-tomcat-7.0. -. Tar.gz[[email protected] src]# MV apache-tomcat-7.0. -/usr/local/tomcat[[email protected] src]# cp-p/usr/local/tomcat/bin/catalina.sh/etc/init.d/tomcat[[email protected] src]# vim/etc/init.d/Tomcat//in the second line, add the following content... # chkconfig: the  the Panax Notoginseng# description:tomcat Server init script# Source Function Library./etc/init.d/Functionsjava_home=/usr/local/jdk1.6.0_23/Catalina_home=/usr/local/Tomcat ... [email protected] src]# chmod755/etc/init.d/tomcat[[email protected] src]# Chkconfig--add tomcat[[email protected] src]# chkconfig Tomcat On[[email protected]Src]# Service tomcat start[[email protected] src]# PS aux |grep Tomcat

3. Configure Tomcat

1. Configure access ports for the Tomcat service [email protected]~]# vim/usr/local/tomcat/conf/server.xml ...<connector port="8080"Protocol="http/1.1"/*Tomcat starts with the default of 8080, or can be modified to 80<connector port= "protocol=" http/1.1 "*/2. Configuring a new virtual host [email protected]~]# vim/usr/local/tomcat/conf/Server.xml//find "www.123.cn"Appbase="/data/tomcatweb"Unpackwars="false"autodeploy="true"xmlvalidation="false"Xmlnamespaceaware="false"> <context path=""Docbase="./"debug="0"reloadable="true"crosscontext="true"/>[[Email protected]~]# Service Tomcat Stop[[email protected]~]# Service Tomcat Start

4. Test Tomcat

[Email protected] ~]# mkdir-p/data/Tomcatweb[[email protected]~]# vim111. JSP//Join now time is: <%=NewJava.util.Date ()%></center></body>[[Email protected]~]# Curl-xlocalhost: theWww.123. cn/111. JSP//at this point, note whether there are previously changed Tomcat port, no change will be written localhost:8080//whether the result is running now time is: Thu June -  the: -:GenevaCst -</center></body>/*Tomcat builds successfully*//*on the real machine, bind the hosts and test it with IE. */

Second, resin

1. Installing the JDK

You can install the above Tomcat method to configure

2. Installing resin

[[email protected] ~]# wget http://www.caucho.com/download/resin-4.0.36.tar.gz[Email protected] ~]# tar zxvf resin-4.0. $. Tar.gz[[email protected]~]# CD resin-4.0. $[[Email protected]resin-4.0. ]#./configure--prefix=/usr/local/resin--with-java-home=/usr/local/jdk1.8. 0_31[[email protected]resin-4.0. ]# make &&Make Install[[email protected]resin-4.0. ]#/etc/init.d/resin Start

3. Configure resin

[Email protected] ~]# vim/usr/local/resin/conf/Resin.xml//find <cluster id= "app", where to add between "www.123.com"root-directory="."> <web-app id="/"root-directory="/tmp/123"/> [[Email protected]~]# mkdir/tmp/123[[Email protected]~]# vim/tmp/123/test.jsp//Join now time is: <%=NewJava.util.Date ()%> </center></body>//Test[Email protected] ~]# Curl-xlocalhost:8080Www.123. com/test.jsp

Tomcat, resin for parsing jsps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.