Installation configuration for Tomcat and resin

Source: Internet
Author: User


One. Tomcat installation configuration

1. What is Tomcat

Tomcat is a software used to parse a JSP program.

Tomcat is a core project of the Apache Software Foundation (Apache Software Foundation) Jakarta Project, developed by Apache, Sun, and other companies and individuals.

Tomcat is a lightweight application server that is widely used in small and medium-sized systems and concurrent access users, and is the first choice for developing and debugging JSP programs.


2. Installing GDK

Download JDK website address: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html We are here to download jdk-8u31-linux-i586.tar.gz

Baidu Network disk: Http://pan.baidu.com/s/1bnfb4ez

Unzip after download:

Tar zxvf jdk-8u31-linux-i586.tar.gz

MV Jdk1.8.0_31/usr/local/jdk1.8.0_31

vim/etc/profile.d/java.sh//Add the following configuration


Java_home=/usr/local/jdk1.8.0_31

Java_bin=/usr/local/jdk1.8.0_31/bin

Jre_home=/usr/local/jdk1.8.0_31/jre

Path= $PATH:/usr/local/jdk1.8.0_31/bin:/usr/local/jdk1.8.0_31/jre/bin

classpath=/usr/local/jdk1.8.0_31/jre/lib:/usr/local/jdk1.8.0_31/lib:/usr/local/jdk1.8.0_31/jre/lib/ Charsets.jar

Copy Code


. /etc/profile.d/java.sh


If the above configuration succeeds, the following command can see the Java version:

Java-version


3. Install Tomcat

Tomcat official website tomcat.apache.org

cd/usr/local/src/

wget http://apache.fayea.com/tomcat/tomcat-7/v7.0.57/bin/apache-tomcat-7.0.57.tar.gz

Tar zxvf apache-tomcat-7.0.57.tar.gz

MV Apache-tomcat-7.0.57/usr/local/tomcat

Cp-pv/usr/local/tomcat/bin/catalina.sh/etc/init.d/tomcat

Vim/etc/init.d/tomcat//Join from second line


# chkconfig:2345 63 37

# Description:tomcat Server init script

# Source Function Library

. /etc/init.d/functions

Java_home=/usr/local/jdk1.8.0_31

Catalina_home=/usr/local/tomcat

Copy Code



chmod 755/etc/init.d/tomcat

Chkconfig--add Tomcat

Chkconfig Tomcat on

Service Tomcat Start

PS aux |grep Tomcat

Browser input http://ip:8080 to see Tomcat's Welcome page


4. Configure Tomcat

To change the default boot port:

Cd/usr/local/tomcat

Vim Conf/server.xml


Change Connector port= "8080" to Connector port= "80"

To configure a new virtual host:

Find </Host> next line insert new <Host> content as follows:

Unpackwars= "false" autodeploy= "true" xmlvalidation= "false"

Xmlnamespaceaware= "false" >

<context path= "" docbase= "./" debug= "0" reloadable= "true" crosscontext= "true"/>

</Host>

Restart: service tomcat stop; Service Tomcat Start


5. Test JSP parsing

VIM/DATA/TOMCATWEB/111.JSP//Contents are as follows:

Now time is: <%=new java.util.Date ()%>

</center></body>

Curl-xlocalhost:80 www.111.com/111.jsp

See if the results are similar:

Now time is:wed Jan 22:33:37 CST 2015

</center></body>


Two. Resin installation configuration

1. Install JDK Ibid.

2. Installing resin

wget http://www.caucho.com/download/resin-4.0.36.tar.gz

Tar zxvf resin-4.0.36.tar.gz

CD resin-4.0.36

./configure--prefix=/usr/local/resin--with-java-home=/usr/local/jdk1.8.0_31make && make install

/etc/init.d/resin start


3. Configure resin

Cd/usr/local/resin/conf

Vim Resin.xml

Structure: <cluster id= "App" >

<web-app id= "/" root-directory= "/tmp/123"/>



vim/tmp/123/test.jsp//Join

Now time is: <%=new java.util.Date ()%>

</center></body>


Test:

curl-x127.0.0.1:8080 www.123.com/111.jsp


Reference:

http://blog.csdn.net/howareyouo/article/details/7776875

Http://lutaf.com/180.htm

http://my.oschina.net/onlinechen/blog/111347


Installation configuration for Tomcat and resin

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.