Publish a Java project to a local Linux virtual machine

Source: Internet
Author: User

1. Install the virtual machine first, this is not described here.

2. Then I want to download a winscp for file transfer between Windows and virtual machines.

First obtain the IP of the virtual machine:

Must remain connected,

This is the case if you disconnect the IP

3. Transferring files

Copy the JDK and Tomcat package to the/usr/local folder and unzip it.

TAR-ZXVF apache-tomcat-8.0.29.tar.gz

MV Apache-tomcat-8.0.29 Tomcat

TAR-ZXVF jdk-7u79-linux-x64.tar.gz

Vim/etc/profile added at the end

Input: java-version Check if the JDK is installed successfully

Success

Then launch tomcat into the Tomcat/bin directory./startup.sh after entering the browser input 192.168.200.128:8080 see if you can enter the Apach home.

4. Launch the Tomcat test.

The result can be in the browser of the virtual machine, which is not available under Windows.

Baidu after a while said to open the firewall of the virtual machine: Service iptables stop

After the request again under Windows, success.

5. Make the project into a war package (for example, named Test.war), and under Tomcat/webapps, open tomcat/conf/server.xml add <context docbase= between

Publish a Java project to a local Linux virtual machine

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.