如何更改Jenkins的主目录? [英] How to change home directory of Jenkins?
问题描述
简单的问题:如何更改jenkins主目录位置?默认情况下,它指向 / var / lib / jenkins
,而我想它指向 / home / jenkins
。我改变了我的 $ JENKINS_HOME
到 / home / jenkins
但它不帮助我。
,所以改变该用户的home-dir应该做的工作。
/ p>
如果不确定,只需使用shell命令(例如'id'或'whoami'或'env')运行一个测试作业即可找到Jenkins使用的用户。 / p>
另外,注意由用户匿名启动
的消息并不意味着Jenkins作为匿名用户 -
请 Sagar 和 Peter Tran :
Simple question: How to change the jenkins home directory location? By default it points to /var/lib/jenkins
whereas I want it to point to /home/jenkins
. I have changed my $JENKINS_HOME
to /home/jenkins
but it doesn't help me.
Jenkins usually runs with its own user,
so changing the home-dir of that user should do the job.
If not sure, simply run a test-job with a shell-command like 'id' or 'whoami' or 'env' to find the user that Jenkins uses.
Also, note that a message of "Started by user anonymous
" does not mean that Jenkins started as an anonymous user -
please see this related answers by Sagar and Peter Tran:
how to run jenkins as a different user
这篇关于如何更改Jenkins的主目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!