1. Linux Project deployment instructions
1. Deployment flowchart
1.2 Linux install Mysql database
Please refer to the blog document for details , Database installation
1.3 modify jt-manage Configuration of
1.3.1 Modify the upload address of the picture
explain : stay Linux Directory specifies a directory where images are stored
1.3.2 Project packaging and release
1.3.3 Upload war Package file
1.3.4 Code changes
remaining problems :
1.3.5 Project release
adopt IP You can visit the address
1.4 tomcat Cluster deployment
1.4.1 war Package deployment instructions
1.4.2 How to execute multiple commands
1 You can use & operator Continue to execute commands
java -jar 8081.war & java -jar 8082.war & java -jar 8083.war &
1.4.3 How to shut down the server
command :ps -ef | grep java
command 2: Retrieve only java service jps
Command specification :
1."|" The Conduit The result of the previous query of the pipeline , As a parameter after the pipe ( Conditions ) To operate
2.kill Kill process
kill PID Number Normal shutdown process ( Weak closing )
kill -15 PID Number Must close , But you can do the following
kill -9 PID Number closed , No time for follow-up tasks
1.4.4 About Linux Background start
explain : adopt java -jar 8081.war Way to start , It can only be performed at the front desk , If you turn off the connected terminal , Then the program will close with it , So we need to Turn on background operation
command :
nohup java -jar 8081.war => 8081.log &
nohup java -jar 8082.war => 8082.log &
nohup java -jar 8083.war => 8083.log &
1.4.5 About view command learning
cat Output all the contents of the file
more Output all the contents of the document , Paging output , Space for the next screen ,q sign out
less Usage and more identical , Only by PgUp、PgOn Key to control
tail Used to display the number after the file , Frequently used
tail -10 nginx.conf see nginx.conf Last 10 That's ok
tail –f nginx.conf Dynamic view log , It is convenient to view the new information in the log
ctrl+c End of view
1.5 The script to start tomcat The server
explain :Linux The script in is generally used in shell Script .
step :
1. edit start.sh Script file for
vim start.sh
2. Specify the header of the script
3. The content of the specified script
4. Execute the script
[root@localhost tomcats]# sh start.sh