Recently I occasionally contact how to deploy the project, friends request, while this occasion, a simple summary, for everyone to share, but also hope that the great God, we learn from each other, there are problems do not spray.
1. Use environment: Win 7+myeclipse + tomcat 7
2. Prerequisite software: Xshell and xftp, I use the 4.0 version, under Windows to install the software directly next step, the installation of a fool can be
3. Start the deployment environment:
3.1 Open the Xshell Remote Connection tool and create a new connection, specifically
3.2 After filling in the appropriate information, OK, then pop up the page
3.3 Select the appropriate connection, click on the connection, then you need to enter the connection user name and password, enter the correct user name and password to log in, specific
4. Deployment Project
4.1 As shown in 3 above, first remote a connection, and then into the Linux server Tomcat project, my directory in the directory I use under/tomcat8/tomcat/, enter the command cd/tomcat8/tomcat/, into the project deployment path, Then use the shortcut key ctrl+alt+t, or click on the toolbar command,
After 4.2, the XFTP remote File Connection tool is automatically opened, which is dedicated to the deployment project, the left side represents the local file path, and the right side represents the Linux server's file system, such as:
4.3 left operation, go to your local Tomcat deployment path, my in my D:\Program Files\apache-tomcat-8.0.11\webapps, note is Tomcat's deployment path, not myeclipse path, The former contains the Jsp,java class file, Instead of. java files, right into the Linux server Tomcat WebApps, and then select the left side of the project, right-click to select the transfer, if, has been deployed before the project, will prompt the file already exists, select Overwrite can;
4.4 Then an upload progress bar will appear below, waiting for the upload to complete.
4.5 After uploading the file, you need to go to the Xshell window, first shut down the server tomcat, then turn on the Tomcat server, the specific commands such as
5. Congratulations, you have learned how to deploy the project.
Other questions:
1. Once a few tomcat were opened
Solution: You can enter "Ps-ef |grep tocmat1" in Xshell to see how many tomcat2 are currently open, and if greater than 2, you can kill the process using the KILL command
2. Port occupancy Issues
Solution: Use the following command to query the port number that is being used and the program that is using it. command: Netstat-ano, and then find the process id--pid that corresponds to the Tomcat port,
Use Kill to kill the process directly. As for the default port number for Tomcat, you can see it through the main profile server.xml of the Conf directory under the Tomcat server, as in the following code
<ConnectorPort= "8080"maxhttpheadersize= "8192"MaxThreads= "Max"minsparethreads= "+"maxsparethreads= " the"enablelookups= "false"Redirectport= "8443"Acceptcount= "+"ConnectionTimeout= "20000"Disableuploadtimeout= "true" />
Deploy simple projects with Xshell and XFTFP