更改Jenkins安装路径

时间:2020-06-02 07:42:18

标签: jenkins

默认情况下,我使用yum在Red Hat Linux机器上的默认位置以下安装了Jenkins:-

Home - /var/lib/jenkins/
War - /usr/lib/jenkins/

我想在不同位置和端口的同一台服务器上安装另一个詹金斯。

New Home - /app/jenkins/data/jenkins/
New War - /app/jenkins/bin/
log location - /app/jenkins/logs/

任何想法,在安装jenkins时如何在yum中提及路径。

1 个答案:

答案 0 :(得分:0)

您在这里有四个选择:

  1. yum --installroot=/opt/jenkins1 --releasever=<your_release_version> install jenkins¹然后您可以使用chroot together with Systemd(非常hacky)
  2. 只需下载jenkins.war,然后使用不同的start options将其启动两次。 Use Systemd again由两个人管理服务。
  3. Use Docker to create two instances
  4. 使用Jenkins的不同权限模型来创建两个实例,而不是创建两个实例。 Matrix-based security。您也可以scale the instance then

我可以理解,为什么有人需要两个实例(不同需求的不同部门),但是您将需要管理两个Jenkins实例,因此您应该尝试扩展第一个实例的功能。

(¹):我刚刚在Fedora机器上检查了dnf命令,但是对于(甚至更旧的)Red Hat,它应该是相同的