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