Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start jenkins in the background

I'm using .war file to run jenkins on my server. They say use

java -jar jenkins.war

(Source: https://wiki.jenkins-ci.org/display/JENKINS/Starting+and+Accessing+Jenkins) to start the server. This starts the server and shows log on screen and it is ready to use.

The only problem is when I "ctrl+c" it stops the server. I want that it should start in the background so that even though I exit from putty it should be running. I know if use native package ".deb" it will be installed as service but I want to do it using only ".war" file and not as native package ".deb". Is it even possible?

like image 227
Umakant Patil Avatar asked Mar 10 '14 05:03

Umakant Patil


People also ask

Why is Jenkins localhost not working?

If you do have a problem where Jenkins on localhost 8080 is not working, verify that the JDK is installed and the Java utilities in the JDK's bin directory are on the PATH. This can be accomplished with the java -version command.


1 Answers

Just put the process in the background as suggested by @KeepCalmAndCarryOn.

nohup java -jar jenkins.war &

I hope this helps.

like image 162
Eldad Assis Avatar answered Oct 25 '22 00:10

Eldad Assis