Jenkins is an application that monitor the executions of repeated jobs, such as building a software project, or cron job running from server. First of all Jenkins purpose is testing / building software projects. It is used mostly from developers, allowing an easier way to test the application.

How to install it on ubuntu server?

First of all install the apache2 webserver if not installed:
[code] apt-get install apache2 [/code]
Update you server to the latest version

[code]sudo apt-get update && sudo apt-get upgrade [/code]

Install java version:
[code] apt-get install openjdk-7-jdk[/code]

After finished you can check you java version installed with the following command:
[code]java -version [/code]
Add the key source in the opt list

[code] wget -q -O – https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add – [/code]

Create a Jenkins source list:

[code]sh -c ‘echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list’

[/code]

Update again:

[code]apt-get update [/code]

Now install jenkins:

[code]apt-get install jenkins [/code]

After installed you should see Jenkins run by default on port 8080
[code]http://your_domain:8080 or http://your_server_IP_address:8080[/code]
Most probably this port it is already used so Jenkins will not run, in order to troubleshoot this issue we need to change the default Jenkins port. Go to the Jenkins file
[code]nano /etc/sysconfig/jenkins[/code]
and edit the port number from 8080 to whatever port you need to work with Jenkins.
Please be careful to check if the port is free. How to do this?
[code]telnet 127.0.0.1 (Port number) [/code]
If you will see no connection at all please check your firewall, if connected and no service it is displayed than everything it is ok.
After logged on Jenkins please secure it, setting up you email and password.

Leave a Reply

Your email address will not be published. Required fields are marked *