All the software used in this article has been transmitted to the Baidu cloud disk, you need to use the self-download installation. Link: Https://pan.baidu.com/s/1dplyekS1ZExzvaHHdiOX0Q Password: fo4q
Here the author demonstrates a project deployment using a Linux system installed on a virtual machine, and a Web project deployment on a cloud server is similar
Pre-Preparation:
First, I installed the virtual machine software on my own computer, I used the VMware Workstation, and then I install the Linux system on the virtual machine, I use the cent OS,
After installing the Linux system and configuring its IP address, here are two instructions for configuring IP under the Linux system, one of which is a temporary configuration:
ifconfig eth0 192.168.0.168 Network 255.255.255.0
Another is to change the configuration file statically assigned IP address:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Service Network restart//Restart Network Service (reload NIC configuration)
The IP address here to your computer in the same network segment, my computer's IP address is 192.168.0.166,
Then test the connectivity of the computer, ping instructions, the computer ping the virtual machine IP, the virtual machine ping the computer, each other can ping the proof of the environment to build the completion.
Then the following begins to install the JDK and Apche Tomcat, where the author only describes the unzip file Tar command installation of the two software, other ways of self-query.
The premise of decompression first has to have both software of the compressed package, using the WinSCP file Transfer tool, after installation login
Log in to see the following window, users can see both the computer and the directory structure of the virtual machine
The TAR command is introduced first:
TAR-ZXVF jdk-7u65-linux-i586.tar.gz
TAR-ZXVF apache-tomcat-7.0.69.tar.gz
Gzip,x extract files in z format, v shows the list of executable files, f files to be manipulated
After the above two commands are unpacked for JDK and Tomcat, the file Transfer tool
Or, according to the command LS, you can see the directory that has been unzipped.
Then you need to configure the environment variables for the JDK:
Edit profile, configure environment variables, make their environment variables effective
Vi/etc/profile
Set these three instructions at the end of the file
Souce/ect/profile make its environment variable effective
Next turn on Tomcat,
Enter Tomcat binary files via Cd/usr/local/apache-tomcat-7.0.69/bin
Using./startup.sh to start Tomcat, on the local computer via the virtual machine IP address: 8080 Access Tomcat's default page, which appears as shown on the following page to prove that Tomcat is open successfully
Drag the developed Web project into the war package by WinSCP file transfer and dragging its war file to the Tomcat WebApps directory
Use the./shutdown.sh and./startup.sh commands to restart Tomcat, and then access your Web project by accessing it locally when you debug:
Deployment of Web projects under the Linux system