How to Set up Jenkins

2015-04-30

Tags:
Categories:

Download

Get the "latest and greatest" war from jenkins-ci.org.

Startup script

Create a shell script with the following content:

#!/bin/sh

JENKINS_HOME=~/apps/jenkins
JAVA_OPTS=-Xmx512M
nohup java $JAVA_OPTS -jar $JENKINS_HOME/jenkins.war --httpPort=8081 1>$JENKINS_HOME/jenkins.log 2>&1 &

Make the script executable:

$ chmod +x start_jenkins.sh

Use the script to start Jenkins:

$ ./start_jenkins.sh

Now you can access Jenkins at http://localhost:8081/.

Configure

Go to "Manage Jenkins", "Configure System".

At "JDK installations", click "Add JDK".

  • fill "Name" (e.g. "Java 8")
  • uncheck "Install automatically"
  • fill "JAVA_HOME" (e.g. /usr/lib/jvm/java-8-openjdk-amd64)

At "Maven installations", click "Add Maven", and fill the name and path like above.

Click "Save".