Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 23148  / 3 Years ago, wed, september 29, 2021, 3:35:21

I start jenkins web server using command java -jar jenkins.war. It works great. When I close terminal the application stops.



How to make it run even if I close terminal session ?


More From » bash

 Answers
0

The simplest and most direct method is nohup java -jar jenkins.war &. "nohup" means "no hangup", which is vintage terminology for not ending a session when the terminal disconnects. "&" just starts the process in the background, similar to what would happen if you press CTRL+Z (and then type bg 1) while the process is running in the foreground.



WARNING: nohup, by default, sends output of the process to a text file. If you are not careful, that file can become dangerously large in some cases. Treat it like any other ever-growing log file.


[#28007] Friday, October 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ateact

Total Points: 176
Total Questions: 130
Total Answers: 122

Location: Egypt
Member since Sun, Apr 23, 2023
1 Year ago
;