I'm trying to set up Jenkins in Tomcat7 on Ubuntu. I installed Tomcat7 and deployed
jenkins.war, and I now see the Jenkins home page at
http://myhost:8080/jenkins, but it's attempting to create the Jenkins directory at
/usr/share/tomcat7/.jenkins, which it can't for security reasons. I've already created
/srv/jenkins and given the
tomcat7 group permissions, and want to set
JENKINS_HOME to that path. I've tried adding it to the tomcat configuration in
<GlobalNamingResources> <Environment name="JENKINS_HOME" value="/srv/jenkins" type="java.lang.String" override="false"/> <!-- Default settings -->
And I've also tried adding it to the automatically created context file in
ROOT/META-INF/context.xml (there is no
$CATALINA_HOME/conf as far as I can tell).
<Context path="/" antiResourceLocking="false" > <Environment name="JENKINS_HOME" value="/srv/jenkins/" type="java.lang.String"/> </Context>
But even after restarting tomcat7 I still get the same result (trying to use
Where do I need to set the environment variable for
JENKINS_HOME in Tomcat7?