Jenkins: How to change JENKINS_HOME on Windows

转载 2015年11月17日 16:58:10

原文地址:http://tech.nitoyon.com/en/blog/2014/02/25/jenkins-home-win/

If you install Jenkins using MSI installer, it copies files to C:\Program Files (x86)\jenkins and uses the install directory asJENKINS_HOME (on 64bit machine).

This means that Jenkins stores all data (including plugins, workspace and job data) toC:\Program Files (x86)\jenkins. On windows, it is recommended that application data is stored toProgramData and AppData. So, I wanted to change JENKINS_HOME.

First, I added JENKINS_HOME to environment value, but it doen't make any sense. Jenkins prefers the value set onjenkins.xml when we use MSI installer.

Now, let's change JENKINS_HOME to D:\jenkins (Jenkins version: 1.550).

  1. Stop Jenkins service (in windows servers). and then add environment system variables:

    JENKINS_WORK = D:\jenkins

  2. Open jenkins.xml in the install folder, and edit

      <env name="JENKINS_HOME" value="%BASE%"/>
    

    as follows:

      <env name="JENKINS_HOME" value="%JENKINS_WORK%"/>
    
  3. Move all files in install folder except for the following files (Don't copy because it brokes symbolic links injobs folder) to new jenkins_home (D:\jenkins):

    • jre folder
    • jenkins.err.log
    • jenkins.exe
    • jenkins.exe.config
    • jenkins.out.log
    • jenkins.war
    • jenkins.war.bak
    • jenkins.war.tmp
    • jenkins.wrapper.log
    • jenkins.xml
  4. Start Jenkins service.

  5. Open http://localhost:8080/systemInfo and check JEKNINS_HOME has been changed.

Enjoy!


How to retrieve and change partition's UUID Universally Unique Identifier on linux

How to retrieve and change partition's UUID Universally Unique Identifier on linux Conten...
  • loryliu
  • loryliu
  • 2015年06月07日 22:18
  • 486

How to change the default stack size on different platforms

Stack Overflow Problems ======================= This file gives some hints on addressing this proble...

How to Change the MySQL Timeout on a Server

A MySQL server timeout can occur for many reasons, but happens most often when a command is sent to ...
  • gmemai
  • gmemai
  • 2015年10月16日 13:52
  • 338

How to dynamically change label text on PyGTK

利用 threading: 首先 initialize threading: gobject.threads.init(), 注意 threading 的结束, 所以最后 gtk.main(...

gparted and how to change /home directory to a new partition

First,you should install gparted. sudo apt-get install gparted. and then type second:sudo g...

How to install a patch on clusterware 11.2.0.1 into grid infrastructure home

When applying a needed patch to the Grid Infrastructure Home for ASM or CRS the opatch utility may e...

How to install a patch on clusterware 11.2.0.1 into grid infrastructure home

        When applying a needed patch to the Grid Infrastructure Home for ASM or CRS the opatch utili...

How to set up CI System by Jenkins +Maven+Sonar with git

Linux OS is CentOS5.8  and Ubuntu11.1 step 0:remove openJDK from yum #rpm -qa | grep java #rpm ...

How to change MAC address in windows 7

Today, I installed a software which I activated on a different PC before but it gave an error of MAC...

How-to: Change Windows Hostname and Keep Oracle 10g Running

How-to: Change Windows Hostname and Keep Oracle 10g Running Comments (45) | Share So I ...
  • haiross
  • haiross
  • 2014年01月14日 16:35
  • 674
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Jenkins: How to change JENKINS_HOME on Windows
举报原因:
原因补充:

(最多只允许输入30个字)