krs
krs

Reputation: 1537

How to auto-start Jenkins in Ubuntu?

I am using Ubuntu 12.04. And i want to Jenkins to get automatically start with my system to perform building the tasks. Kindly let me know the steps

Upvotes: 3

Views: 15140

Answers (4)

chris Jerry9618
chris Jerry9618

Reputation: 1

Try this command in ubuntu

update -rc.d jenkins defaults

Upvotes: 0

merlucin
merlucin

Reputation: 474

If jenkins is not starting at boot time install the chkconfig package:

apt-get install chkconfig

And then issue the following command:

chkconfig --add jenkins

Finally, with chkconfig --list you should obtain a list with a line inside stating the runlevels at which jenkins will start:

jenkins                   0:off  1:off  2:on   3:on   4:on   5:on   6:off

Upvotes: 1

Łukasz Rżanek
Łukasz Rżanek

Reputation: 5836

The best way to achieve this, in case you want to use Jenkin's built-in web server, is just to install a prepacked version of the software available at official Jenkins Debian/Ubuntu repository. It's as easy as installing any other software on Debian/Ubuntu-like distro. The package will add a startup scripts to your installation which you can control as any other daemon.

If you preffer to use your own installation you can use a startup script that is available on Jenkin's GitHub repository. Quite possibly you will have to modify it to suite your installation, but it's a very good starting point...

Upvotes: 3

JREN
JREN

Reputation: 3630

Go to your /etc/rc.local file and add the line: /etc/init.d/jenkins start to your file

This will run your jenkins start command on startup.

Upvotes: 2

Related Questions