Linux (shell) Deployment Javaweb Project

Source: Internet
Author: User

Deploying Javaweb projects in Linux virtual machines


What you need:

VMware virtual Machines

CentOS System Mirroring

WINSCP Tools

Pietty tools (or No)

Begin:

After installing the virtual machine, it is best to set up a static IP to facilitate subsequent operations.

Connect to the Linux system with WINSCP and Pietty (root login).

The. tar.gz format Tomcat and JDK are passed WINSCP to the virtual machine.

Through the Pietty input command mv downloads/*/usr/local to move all files under the Downloads directory to the/usr/local directory.

cd/usr/local switch to this directory.

Then unzip the Tomcat and JDK TAR-XZVF Tomcat.tar.gz

At this point if the program does not have normal decompression, indicating that the current user does not have permission to execute this file, need to execute such a sentence chmod u+x Tomcat.tar.gz

In the same vein, unzip the JDK.

You then need to configure the environment variable. A file is opened by using the command vi/etc/profile.

At this point you can only look at this file, can not modify. Then press the A or I key to enter the writing status. Find a blank place to write the following two sentences.

Export JAVA_HOME=/USR/LOCAL/JDK

Export path=.: $JAVA _home/bin: $PATH

Then press the ESC key and press the ': ' (colon) key, input Wq and then enter the input of the content you can save.

You will need to enter Source/etc/profile to perform the changes just now.

Next you can enter Java-version javac-version to see if the environment variable has been added successfully.

The project's war package is then imported through WINSCP, placed under the WebApps under the Tomcat directory, and then entered into the bin directory to perform SH startup.sh.


This is a little summary of the recent Learning Linux command.

Related Article

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.