Jenkins怎么修改主目录

jenkins在部署搭建完成后,怎么修改主目录?并且还保证之前的数据不丢失呢?

87c8bf46b7b1eef992ee39cabfb33c4132ba32ee.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_auto%2Fquality%2Cq_80

工具/原料

  • tomcat
  • jenkins
  • Linux

方法/步骤

  1. 1

    JENKINS默认的本家儿目次为/root/.jenkins,修改为/app/jenkins目次

    b666b2530688912c2f85a95e1b4800fc76f797e5.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_auto%2Fquality%2Cq_80
  2. 2

    编纂情况变量配置文件

    profile文件:

    vi /etc/profile在最后插手

    export JENKINS_HOME=xxxx

    最后执行source /etc/profile生效

    baab20863048614399843d878febf6a75e0f53ea.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_auto%2Fquality%2Cq_80
  3. 3

    遏制tomcat办事,将羞眠/root/.jenkins目次中文件移动贪珠亲到/app/jenkins

    号令mv /root/.jenkins/* /app/jenkins/

    5c9c964ce54a2f274cbe5db0e00192dd3240f4eb.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_auto%2Fquality%2Cq_80
  4. 4

    上述步调完当作后,启动tomcat,执行号令

    /usr/local/apache-tomcat-8.5.57/bin/startup.sh

    49bf00425d6b04d1697aef3eb213e8e5edee01e9.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_auto%2Fquality%2Cq_80
  5. 5

    jenkins启动后查抄是否生效,如图已经修率级改了本家儿目次。

    430174fec314f1c511bd34773c27ac5307889de9.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_auto%2Fquality%2Cq_80END

注重事项

  • 要是帮忙到了您,记得存眷我哦!
  • 发表于 2023-06-06 22:27
  • 阅读 ( 72 )
  • 分类:其他类型

相关问题

0 条评论

请先 登录 后评论