How to deploy a project to a Linux server
Tools: SecureCRT, WinSCP 1. First use MAVEN to make the project a war package, Eclipse: Select the project right-click-->run as-->maven This will be 2.copy empty Tomcat project to the Linux server, change port copy Empty project, is the new project put into Tomcat
To change the port is:
First we go into Linux remotely
Steps to read
- 2
The SSH configuration file is in the/etc/ssh/sshd_config file.
- 3
We modify the port by editing this file to implement
Vi/etc/ssh/sshd_config
- 4
Find the #port 22 line, default port 22
We can remove the previous # and change the 22 to another port
- 5
For example, I changed the original line to Port 43999.
In this way, SSH port is 43999 after restarting SSH.
- 6
We can see that the system has been listening to 43999 of this port, in fact it is the SSH service.
END
Precautions
- If there is a policy in the system, allow this port to pass the line Oh.
3. Copy the packaged war package into Tomcat under WebApps 4. Start startup.sh in the Bin directory 5. Operation commands go to bin directory: [[email protected] neco-tomcat-6.0.35-8094]# CD /opt/neco-tomcat-6.0.35-8094/bin/permissions to folders: [[email protected] bin]# chmod 777-r/opt/neco-tomcat-6.0.35-8094/start tomcat Service: [[email protected] bin]#./startup.sh Close service: [[email protected] bin]#./shutdown.sh/opt/neco-tomcat-6.0.35-8094/ WebApps viewing log information: [[email protected] bin]# tail-222f/opt/neco-tomcat-6.0.35-8094/logs/catalina.out
How to deploy a project to a Linux server