How to deploy a Java project (from the building environment)

Source: Internet
Author: User

1, the server needs to install the corresponding development version of the JDK

Download the JDK JDK version on your website and unzip it to a directory such as:

ls Jdk1. 8. 0_111  jdk-8u111-linux-x64.  Tar. gz

Decompression command TAR-XZVF jdk-8u111-linux-x64.tar.gz

2. Add the following environment variables into Vi/etc/profile:

 1  #jdk1. 8.0  ._111  2  java_home=/home/guchen/usr/java/jdk1. 8  .0_111  3  jre_home=/home/guchen/usr/java/jdk1. 8 . 0_111/jre  4  maven_home=/home/guchen/usr/local/apache-maven- 3.3 . 9  5  path= $PATH: $JAVA _home/bin: $JRE _home/bin: $MAVEN _home/ bin  6  classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/< Span style= "COLOR: #000000" >lib  7  export java_home jre_home maven_home PATH CLASSPATH 

Save the environment variable after exit to take effect, execute: source/etc/profile

3. Install Tomcat

Download Tomcat and extract it to a directory such as:

ls Apache-maven-3.3. 9  apache-maven-3.3. 9-bin. tar. GZ  apache-tomcat-7.0.    apache-tomcat-7.0.  . tar. gz

4. Put the war bag in the WebApps and restart Tomcat.

[Email protected]:/home/guchen/usr/local/apache-tomcat-7.0.  the ls docs  Examples  host-manager  Jenkins  jenkins.war  manager  Operation-centre  Operation-centre.war  ROOT

Go to the bin directory to restart Tomcat and execute the command./startup.sh

[Email protected]:/home/guchen/usr/local/apache-tomcat-7.0. the/bin#./startup.SHUsing catalina_base:/home/guchen/usr/local/apache-tomcat-7.0. theUsing catalina_home:/home/guchen/usr/local/apache-tomcat-7.0. theUsing Catalina_tmpdir:/home/guchen/usr/local/apache-tomcat-7.0. the/tempusing jre_home:/home/guchen/usr/java/jdk1.8.0_111/jreusing CLASSPATH:/home/guchen/usr/local/apache-tomcat-7.0. the/bin/bootstrap.jar:/home/guchen/usr/local/apache-tomcat-7.0. the/bin/tomcat-Juli.jartomcat started. [Email protected]-ubuntu16-04lts:/home/guchen/usr/local/apache-tomcat-7.0. the/bin#

URL input ip:8080

If the Tomcat page appears, install OK

How to deploy a Java project (from the building environment)

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.