关闭

Jenkins: How to change JENKINS_HOME on Windows

337人阅读 评论(0) 收藏 举报
分类:

原文地址: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!


0
0

猜你在找
【直播】机器学习&数据挖掘7周实训--韦玮
【套餐】系统集成项目管理工程师顺利通关--徐朋
【直播】3小时掌握Docker最佳实战-徐西宁
【套餐】机器学习系列套餐(算法+实战)--唐宇迪
【直播】计算机视觉原理及实战--屈教授
【套餐】微信订阅号+服务号Java版 v2.0--翟东平
【直播】机器学习之矩阵--黄博士
【套餐】微信订阅号+服务号Java版 v2.0--翟东平
【直播】机器学习之凸优化--马博士
【套餐】Javascript 设计模式实战--曾亮
查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:353331次
    • 积分:4729
    • 等级:
    • 排名:第6079名
    • 原创:63篇
    • 转载:398篇
    • 译文:0篇
    • 评论:21条
    最新评论