Article directory
foreword
The previous article recorded the local deployment process, but the final use must be deployed on the server. If
you are a novice like me, it is strongly recommended to read this first: Deploying xxl-job locally
1. Server configuration java environment
1. Download and install the java environment
. Refer to this article: https://blog.csdn.net/slw213106/article/details/121854308
Note:
1. The java version must be consistent with the java version of the jar package you typed. My local java is 1.8, and the server is 1.7, and then the jar package keeps reporting errors~~~ 2. The configuration file in xxl-job-
admin The database link is changed to the server, and the password will not work even if the password is wrong~~~
2. Throw the two jar packages running locally
1. Run the jar package
Use ftp to upload two jar packages:
Use xshell to enter this directory
Run the two jar packages using the command:
nohup java -jar xxl-job-admin-2.4.0-SNAPSHOT.jar &
nohup java -jar xxl-job-executor-sample-frameless.jar &
Note: & indicates that nohup is running in the background of the terminal : it can continue to run even after closing the terminal, and a nohup.out file will be generated in the directory to save the log
Process id 13391, 13492, if you need to close, kill these two processes
Find the process: ps -ef|grep xxl [find the process containing xxl]
end the process: kill -9 13391
end the process: kill -9 13392
2. Open the port
Although xxl has run successfully, but cannot be accessed, make sure the following two points are OK
1. Whether the cloud server has opened the corresponding port: 8080
2. Enter the server to check the port.
You can first use lsof -i:8080 (query whether the port number is open)
if any If there is no print, the port is not open
Execute the following commands in turn to open the port
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
3. Access check
Browser input: http://xxxx:8080/xxl-job-admin/jobgroup
successfully accessed, the account password official document has the default admin/123456
! ! !
Summarize
It took two days, from downloading the idea, to making the jar package in the dispatch center, to deploying the dispatch center locally, and finally deploying the server, it was finally finished.
Fortunately, I have nothing to do recently. I go to work and play xxl-job. It's so cool!
Reference:
https://www.cnblogs.com/stupid-chan/p/16285247.html