在Red Hat Linux上更改JENKINS_HOME? [英] Change JENKINS_HOME on Red Hat Linux?
问题描述
我使用以下过程来安装Jenkins:
I used this procedure to install Jenkins:
https://wiki.jenkins-ci. org/display/JENKINS/Installing + Jenkins + on + RedHat +发行版
启动并运行后,我发现服务器上的/var/lib/jenkins分区很小.我想移动它,但是我不想更改运行它的用户.我是Linux的新手,我为此感到困惑.我如何将其移动到例如我的家庭/公共"文件夹中? "Jenkins"用户似乎没有主文件夹.它在启动时作为守护程序运行,因此我不知道在哪里配置这些设置. 我可以为Jenkins用户创建主文件夹吗?怎么样?
After it was up and running I discovered the /var/lib/jenkins partition on my server is very small. I want to move it, but I do not want to change the user that it runs under. I am new to Linux and I'm stumped. How do I move it for example to my Home/Public folder? The "Jenkins" user doesn't seem to have a Home folder. Its running as a daemon on startup, so I have no idea where to configure those settings. Can I create a Home folder for the Jenkins user? How?
我读了这篇文章:
https://wiki.jenkins-ci.org/display/JENKINS/Administering + Jenkins
但不理解如何设置新的詹金斯家".我已经使用了export命令,并重新启动了服务,但是旧路径仍然显示在Manage Jenkins屏幕中.
but do not understand HOW to "set the new Jenkins home". I have used the export command, and restarted the service, but the old path still shows up in the Manage Jenkins screens.
我也已经阅读了2-3个关于stackoverflow的类似问题,但是对于我来说总会有一个很大的缺失.在哪里可以找到我永久更改路径的文件?
I've read the 2-3 similar questions on stackoverflow also, but there's always a big missing piece for me. Where to find that file where I change the path permanently?
推荐答案
这是解决问题的简便方法.首先,将Jenkins目录从/var/lib/jenkins
移到/home/jenkins
.然后在/var/lib/jenkins
处创建一个指向/home/jenkins
的符号链接.当然,在执行此操作之前,请先停止Jenkins服务.
Here's an easy way to solve your problem. First, move the Jenkins directory from /var/lib/jenkins
to /home/jenkins
. Then create a symlink at /var/lib/jenkins
pointing to /home/jenkins
. And of course, stop the Jenkins service before doing that.
sudo service jenkins stop
sudo mv /var/lib/jenkins /home
sudo ln -s /home/jenkins /var/lib/jenkins
sudo service jenkins start
这篇关于在Red Hat Linux上更改JENKINS_HOME?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!