Overall,
1, connecting the server
2, upload the war package project
3, start Tomcat
Here's a step-by-step:
1, connect the server: We need to know the address (example: 202.114.23.34), username (example: root), password (example: 123456), port number (for FileZilla; example: 22)
Open terminal input SSH [email protected], connect and enter password: 123456, show Welocome .... Landing Success!
2, under normal circumstances works in the home directory. If it is not found, and the server is also deployed Java engineering, then execute Ps-ef|grep Java, you will find the directory. Directory in/home/xxxx/apache .....
3, this time if the update server is best to back up, mkdir backup CP-PR apache-tomcat-6.0.36 Backup this is two commands.
4, when we go into the Tomcat bin directory Cd/home/xxxxx/apache-tomcat-6.0.36/bin, stop Tomcat./shutdown.sh
5, this time we enter the WebApps directory CD. /webapps look at the file ls, you can see what's in the current directory. Just look.
6, Upload War package
1. This is the time to upload the war package, which can be uploaded via the FileZilla tool. Enter the host, user name, password, port number, fast connection on OK, if there is no error, look at the input log can show the connection success.
2. Upload the war package to/home/xxxx/apache-tomcat-6.0.36/webapps. Very simple to operate, not to talk about. However, depending on the size of the project, the war package may be very large and willing to be small, patiently wait for it. I passed a 60M about 8 minutes or so.
7, enter Tomcat's Bin directory Cd/home/xxxxx/apache-tomcat-6.0.36/bin, and start Tomcat./startup.sh
8, this is the time to wait for 3-5 minutes, this is the process of the Tomcat Solution War package to close the next tomcat./shutdown.sh (if you don't want to follow the details).
9. Go to WebApps CD after a while. /webapps can look at the files in this directory, the project folder should be imported to appear
Docs Examples Host-manager Manager project folder Project 2 project. War ROOT
10, if the update works, it is best to back up the original root under the MV root Root_bak
11. Name the project name root MV Project root. 10,11 is to change the new project to root and change the original root to Bak.
12, the Project War package under the WebApps can be removed. RM Njcit.war Then move the Root_bak out to the MV Root_bak. /
13, then Cd/home/xxxx/apache-tomcat-6.0.36/bin then./startup.sh Start Tomcat
14, try to access the next, OK!
PS: Locate file: Find/-name file name
How to deploy a Java project to a server