Table of Contents
System requirement
Jenkins requires Java7 or above to function. Java8 is recommended. Jenkins requires a fair amount of memory to operate well. Smaller installations should start around 256MB-1GB.
Unix/Linux Installation
Jenkins has native integrations with the following OSes. See respective sections for how to make Jenkins run in the background automatically:
- Installing Jenkins/Hudson as Solaris 10 service
- Installing Jenkins on Ubuntu
- Installing Jenkins on Red Hat Distributions
- Installing Jenkins as a Unix daemon
- Installing Jenkins with Docker
Alternatively, if you have a servlet container that supports Servlet 3.1, such as Glassfish v4, Tomcat 8 (or any later versions), then you can run them as services, and deploy jenkins.war
as you would any other war file. Container specific documentation is available if you choose this route.
Top of page
Windows Installation
If you're running on Windows it is good to run Jenkins as a service so it starts up automatically without requiring a user to log in. The easiest way is to run the Windows installer, linked from Jenkins' homepage. This also has the advantage of being easier to automate.
The manual way is to follow Installing Jenkins as a Windows service. Alternatively, you can install a servlet container like GlassFish and Tomcat, which can run as a service by itself, and then deploy Jenkins to it.
Since Jenkins was written to work on unix-like platforms, some parts assume the presence of unix-utilities. It is advised to install these as well on Windows. Install UnxUtils (this includes a shell that seems to work with forward and backwards slashes and does globbing correctly)(UnxUtils does not download), put it in the Windows PATH
, and copy sh.exe
to C:\bin\sh.exe
(or whichever drive you use) to make shebang lines work. This should get you going. If UnxUtils gives you trouble (Fork Failed Errors), try Win-Bash.
Installation Wizard
TODO. This feature is under development.
Jenkins Offline Installation
Case Studies
Also, see how other people are deploying Jenkins/Hudson to get some idea of how to make it fit your environment.
- How I setup Git, Gerrit, Jenkins, Nginx for 1 master with linux, windows, mac slaves for Continuous Delivery of Cpp builds and tests.
- Case study of Sven Reimers
- Case study of Kohsuke Kawaguchi
- Case study of Rhett Sutphin
- Case study of Ned Collyer
- Case Study of Arnaud Lacour
- Case Study of JBoss
- we'd love to list yours here. Please talk to us.
19 Comments
Anonymous
Regarding Unix/Linux, it would be nice to easily find a start/stop script to deploy under /etc/rc* so it is ensured Hudson starts after a reboot.
Anonymous
I used a simple script in /etc/rc.d/init.d in conjuction with the Fedora "chkconfig" command to create a linux service. Here's the script including the chkconfig parms included as comments. Do a "man ckkconfig" for more details on chkconfig. #!/bin/bash # # hudson This shell script starts the Hudson continuous integration # service. # # chkconfig: 2345 64 36 # description: The Hudson CI server # processname: mysqld java -jar /root/hudson/hudson.war --httpPort=18080 --ajp13Port=18009 >/root/huds on/hudson.log 2>&1
Anonymous
I've made some minor and not so minor changes to the above init.d script - here's the new (and more readable) version:
Anonymous
Here's an even more elaborate init.d script:
Unknown User (joa23)
Attention this script at least in my case overwrote the PATH variable, what caused my perforce plugin to not find the p4 executable.
So you want to add a line in the script to add the p4 executables to the path again.
Anonymous
To Anon of the Jan 27 2008 post :
That script works great, thanks for that
G
Unknown User (mark.wolff)
I have hudson running as a widows service and now I need to change the port number. On previous installs, I fixed this before I set up the windows service. Can I change the port number now?
Unknown User (robert)
You can configure that in hudson.xml
Look for httpPort in the <arguments> line.
Unknown User (hmaass)
Another alternative for the init script is the Tanuki Service Wrapper. They already provide an example for hudson:
http://wrapper.tanukisoftware.org/doc/english/integrate-jar-win.html
Unknown User (mnadeem)
Jenkins Runner does use tanukisoftware JSW
Unknown User (testmonkey)
I am using Hudson on Windows XP 64-bit. I have been using version 1.320 and I tried to upgrade to 1.352. Unfortunately when I upgraded to 1.352, I was unable to login to Hudson. I am running Hudson as a Windows service.
Here is the procedure that I followed:
1. Stop the Windows service for Hudson
2. Copy the WAR file to c:\hudson
3. Start the Windows service
After doing this and not being able to login, I followed the same procedure to roll back to 1.320 and was able to login again.
Unknown User (suresh)
Hi,
Am new to CI and jenkin's too, when i hit the test drive... the jenkin's console says "Jenkins is fully up and running" and when i try to hit the http://localhost:8080/ its showing connection refused. can anyone help me with this...
Am using windows machine.
do i need the tomcat to be installed in my machine?? or i can't able to launch the test drive with windows machine. Thanks in advance
Unknown User (annetheagile)
On windows, using the installer is now the best practice, per the home page. I added that note to the page, above but it might need time to be posted.
Unknown User (mnadeem)
Jenkins Runner can also be used to manage jenkins in any environment
Unknown User (immohuneke)
I've managed to install Jenkins and other software in a CentOS 7 virtual machine provisioned into AWS EC2 using a Vagrant script with the AWS provider.
My experiences are written up under http://aspsp.blogspot.ch/2016/01/use-vagrant-to-set-up-centos-7-vm-in.html
Unknown User (shankar)
I added my case study titled how I setup git, gerrit, nginx, jenkins for continuous delivery of cpp builds and tests. Now some person has deleted that page. I came back here to refer what I did before and its gone. That will teach me to share on a public site. I cant even find my deleted page. I wont be contributing here anymore thats for sure. And the page is not even available in wayback machine. This site is not available on archive.org/web Thats sad. I should have kept a copy of my notes.
Unknown User (shankar)
OK. I restored my page and got a copy. I created a separate page for the bozo who shat on my page. Everything is fine again.
Unknown User (rnhurt)
Just a note on using Jenkins on AWS behind an ELB (Elastic Load Balancer). In my case I had my master node behind an ELB with slave nodes spread out over other VPCs in other regions. Every minute or so my slaves would all disconnect and reconnect with an "java.io.eofexception unexpected stream termination" error. It turns out that ELBs don't really like long running connections (such as the one between master <--> slave) and they have an Idle Timeout setting that defaults to 60 seconds. After the timeout occurs with no traffic between the systems the ELB closes the connection. Jenkins notices the dropped connection, throws a EOFException, and reconnects. This happens again, and again, and again.
My solution was to increase the ELB Idle Timeout to 3600 (the maximum) seconds. Hopefully, there will be traffic between the master and slave which will reset the clock on the timeout. I think a better solution might be to have some sort of keepalive for slaves.
Unknown User (yanpei526)
How can I uninstall Jenkins of 2.7.4 on Mac?
Someone said execute '/Library/Application Support/Jenkins/Uninstall.command', but I can't find this file.
Also can't find /Library/LaunchDaemons/org.jenkins-ci.plist.