Jenkins installation
You can install Jenkins in 2 different manners:
- As a Linux package (apt-get ...)
- As a standalone WAR package
Contents
Installation (Ubuntu)
The following instructions are for Ubuntu 14.04 LTS.
You can find all these instructions and more on the official wiki page: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
!! NOTE: Jenkins updates are not always very good. Be careful when you run apt-get upgrade !!
Get package
cd /tmp
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
Service configuration
To adjust root path and port you just need to edit the service launcher.
vim /etc/default/jenkins
Adjust the default values:
# port for HTTP connector (default 8080; disable with -1)
HTTP_PORT=8080
# port for AJP connector (disabled by default)
AJP_PORT=8009
# servlet context, important if you want to use apache proxying
PREFIX=/jenkins-guillaume
JENKINS_ARGS="--webroot=/var/cache/jenkins/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT --prefix=/jenkins-guillaume"
Restart the service
sudo service jenkins restart
Test it! Go to http://localhost:8080/jenkins-guillaume
Firewall
Edit your firewall script and add:
IPTABLES=`which iptables`
$IPTABLES -A INPUT -p tcp --dport 8080 -j ACCEPT # Web container
$IPTABLES -A OUTPUT -p tcp --dport 8080 -j ACCEPT # TomCat (Java Web Server)
Of course, if you already have a Tomcat server you need to adjust these ports.
Installation (war)
Just download the latest WAR and deploy it on your Tomcat.
Jenkins CI: http://jenkins-ci.org/