Reputation: 349
I am new to apache tomcat and Jenkins. I have installed Tomcat Apache server and upload Jenkins on it.
So, now Jenkins is there in following directory :
C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\jenkins
But when I am trying to execute command as :
echo %JENKINS_HOME%
it simply returns %JENKINS_HOME%
Please tell me how to set Jenkins home directory. Thanks in advance.
Upvotes: 1
Views: 5237
Reputation: 907
In windows, Open Apache Tomcat Directory,
Locate context.xml under conf folder.
add the following lines
<Environment name="JENKINS_HOME" value="C:\Jenkins\JK_HOME" type="java.lang.String"/>
Upvotes: 0
Reputation: 39
To change the location of the Jenkins Configuration directory which is running inside the Apache Tomcat server can be done using the below steps:
Open the context.xml inside the conf directory and update as below
<Context ...>
<Environment name="JENKINS_HOME" value="/opt/jenikins" type="java.lang.String"/>
</Context>
The above code block will change the Jenkins Home to /opt/jenkins. Replace it whatever you desire.
NOTE: It is important to change the Jenkins Config directory, by default it gets generated in the USER HOME directory where you may not have enough space to hold all the Jenkins Job config data.
Upvotes: 4
Reputation: 10382
To set some Windows environment variables, you can customise the following batch:
C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\startup.bat
Just add the following line at the beginning of the batch:
set JENKINS_HOME=C:\YOUR_JENKINS_HOME_PATH
Upvotes: 2