jenkins the definitive guide

(Jeff_L) #1

it would be C:\Documents and Settings\John.jenkins. On a Linux machine, it would most
likely be under /home/john/.jenkins. And so on.


You can force Jenkins to use a different directory as its home directory by defining the JENKINS_HOME
environment variable. You may need to do this on a build server to conform to local directory
conventions or to make your system administrator happy. For example, if your Jenkins WAR file is
installed in /usr/local/jenkins, and the Jenkins home directory needs to be in the /data/jenkins
directory, you might write a startup script along the following lines:


export JENKINS_BASE=/usr/local/jenkins
export JENKINS_HOME=/var/jenkins-data
java -jar ${JENKINS_BASE}/jenkins.war

If you are running Jenkins in a Java EE container such as Tomcat or JBoss, you can configure the webapp
to expose its own environments variables. For example, if you are using Tomcat, you could create a file
called jenkins.xml in the $CATALINA_BASE/conf/localhost directory:


<Context docBase="../jenkins.war">
<Environment name="JENKINS_HOME" type="java.lang.String"
value="/data/jenkins" override="true"/>
</Context>

In a previous life, Jenkins was known as Hudson. Jenkins remains compatible with previous Hudson
installations, and upgrading from Hudson to Jenkins can be as simple as replacing the old hudson.war
file with jenkins.war. Jenkins will look for its home directory in the following places (by order of
precedence):


1.A JNDI environment entry called JENKINS_HOME

2.A JNDI environment entry called HUDSON_HOME

3.A system property named JENKINS_HOME

4.A system property named HUDSON_HOME

5.An environment variable named JENKINS_HOME

6.An environment variable named HUDSON_HOME

7.The .hudson directory in the user’s home directory, if it already exists

8.The .jenkins directory in the user’s home directory

3.5. Installing Jenkins on Debian or Ubuntu


If you are installing Jenkins on Debian and Ubuntu, it is convenient to install the native binary package
for these platforms. This is easy enough to do, though these binaries are not provided in the standard

Free download pdf