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.