Nginx + Tomcat (Java) Server deployment

Source: Internet
Author: User

Tomcat is a servlet container developed by the Apache Software Foundation Jakarta Project, which implements the servlet and Javeserver Page (JSP) according to the technical specifications provided by Sun Microsystems Support, Tomcat itself is also an HTTP server, mainly used to parse the JSP language.


Deployment of the TOMCAT server


Installation Environment:

JDK + TOMCAT


Installation steps:

Cd/data

wget-c http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz

Tar zxf jdk-7u79-linux-x64.tar.gz; mkdir-p/data/java/jdk1.7

Mv-f jdk1.7.0_79/data/java/jdk1.7


Vim/etc/profile

Export java_home=/data/java/jdk1.7

Export classpath= $CLASSPATH:$JAVA _home/lib: $JAVA _home/jre/lib

Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH: $HOME/bin



650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/0E/wKiom1Xysl2TQLBsAAH3El5S4-g958.jpg "title=" 01.png "alt=" Wkiom1xysl2tqlbsaah3el5s4-g958.jpg "/>

source /etc/profile //Make environment variables effective immediately


To test whether the installation was successful:

Java -version

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/0E/wKiom1Xys5jQuc_pAAFs3y5n5kU775.jpg "title=" 02.png "alt=" Wkiom1xys5jquc_paafs3y5n5ku775.jpg "/>


Installing Tomcat


Cd/data

Wget-c http://apache.fayea.com/tomcat/tomcat-6/v6.0.44/src/apache-tomcat-6.0.44-src.tar.gz


tar zxf apache-tomcat-6.0.44-src.tar.gz

Mv-f apache-tomcat-6.0.44-src/data/java/tomcat_6.0

Installation Complete

Start the Tomcat command

/usr/local/tomcat_6.0/bin/startup.sh


See if the TOMCAT process exists

PS     -ef |     grep Tomcat


Defining the Publishing Directory

Add the following snippet at the end of the server.xml configuration file

<context path= "/" docbase= "/data/webapps/www" reloadable= "true"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/37/wKiom1X3yHviu8_3AAR8stRT24A736.jpg "title=" 03.png "alt=" Wkiom1x3yhviu8_3aar8strt24a736.jpg "/>

/data/webapps/www is your publishing directory.

This article is from the "Ride a Pig to Travel" blog, please be sure to keep this source http://songqinglong.blog.51cto.com/7591177/1694979

Nginx + Tomcat (Java) Server deployment

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.