1、 Linux Project deployment instructions
1.1 Deployment flowchart
1.2 Linux install Mysql database
yum install mariadb-server install mariadb database
yum clean all Empty the installation file
Data activation :
Start command systemctl start mariadb
Restart command systemctl restart mariadb
The shutdown command systemctl stop mariadb
Database initialization operation
command : `mysql_secure_installation’
Linux visit Mysql database
Instructions for linking databases
explain :
- If you need to remotely link to the database, you have to go through the firewall
- If you link the database remotely , Remote access must be enabled in the database , Otherwise, reject the link .
Configuration database permissions configuration instructions
To configure Linux Database permissions
Switch Mysql database
Modify the database table
1). Check the data sheet
2). Inquire about user In the table host/root/password
3). take host=“localhost” Change it to "%"
4). Refresh database permissions
Check firewall status
command : firewall-cmd --state
Manually turn off the firewall
explain : Manually shut down the firewall by command
command :
1. systemctl stop firewalld.service # close
2. systemctl start firewalld.service # Turn on
service iptables restart
firewall-cmd --reload
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
Start the server
java -jar 8081.war
adopt IP You can visit the address
1.4 tomcat Cluster deployment
1、 You can use & operator Continue to execute commands
java -jar 8031.war & java -jar 8032.war & java -jar 8033.war &
1.4.1 How to shut down the server
ps -ef |grep java see java Keyword process
kill -9 Port number Kill process
JSP Retrieve only java service
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.2 About Linux Background start
explain : adopt java -jar 8033.war Way to start , It can only be performed at the front desk , If you close the linked terminal , Then the program will close with it , So it needs to be turned on Linux Background operation
command :
nohup java -jar 8031.war =>8031.log &
nohup java -jar 8032.war =>8032.log &
nohup java -jar 8033.war =>8033.log &
1.4.3 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 create a file
2、 Specify the header of the script
3、 The content of the specified script
4、 Execute the script