Easy to understand: Access Java projects with Linux IP addresses

Source: Internet
Author: User

First, install the JDK under Linux

Uninstall first

Java–version (view Java version information)

Rpm-qa | grep Java (see if there is a Java presence)

RPM-E--nodeps java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64 (uninstall the corresponding JDK)

To start the installation:

Mkdir/usr/local/src/java

uploading a JDK tar package

TAR-XVF jdk-7u71-linux-i586.tar.gz

Yum Install glibc.i686

To configure environment variables:

① Vi/etc/profile

② add at the end line

#set Java Environment

Java_home=/usr/local/src/java/jdk1.7.0_71 (add JDK version and directory, depending on the actual situation)

Classpath=.: $JAVA _home/lib.tools.jar

Path= $JAVA _home/bin: $PATH

Export Java_home CLASSPATH PATH

Save exit

③source/etc/profile make changes to the configuration take effect immediately

④java-version view JDK version information, if shown 1.7.0 proven successful

Second, the project packaging

Package the project in Eclipse, right-click Export on the project, and enter the war in the box

Then select the exported directory.

Third, upload the Project war package to Linux

Uploading using the Xftp tool

Iv. deploying the project under Linux

Using the Xshell tool to operate the Linux operating system

Start Tomcat first (the war package file under Tomcat WebApps is automatically decompressed after Tomcat is started)

Move the War Pack project to the WebApps of Tomcat

View the WebApps directory to see that the war package has been unzipped

Five, the operation

Enter the IP address of the virtual machine and the port number of Tomcat and the name of the war package (provided that the project has been shown)

These are the above!!!

Easy to understand: Access Java projects with Linux IP addresses

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.