- Learning Continuous Integration with Jenkins(Second Edition)
- Nikhil Pathania
- 144字
- 2021-07-02 21:18:35
Setting up the Jenkins home path
Before we start using Jenkins, there is one important thing to configure, the jenkins_home path. When you install Jenkins as a service on Tomcat, the jenkins_home path is automatically set to /root/.jenkins/. This is the location where all of the Jenkins configurations, logs, and builds are stored. Everything that you create and configure on the Jenkins dashboard is stored here.
We need to make it something more accessible, something like /var/jenkins_home. This can be done in the following way:
- Stop the Apache Tomcat server using the following command:
sudo systemctl stop tomcat
- Open the context.xml file for editing, which is present inside /opt/tomcat/conf:
sudo nano /opt/tomcat/conf/context.xml
- The file will look like this (comments removed):
<?xml version="1.0" encoding="UTF-8"?> <Context> <WatchedResource>WEB-INF/web.xml</WatchedResource> <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> </Context>
- Add the following line between <Context> </Context>:
<Environment name="JENKINS_HOME" value="/var/jenkins_home"
type="java.lang.String"/>
- Start the Tomcat service using the following command:
sudo systemctl start tomcat
推薦閱讀
- 鴻蒙生態(tài):開啟萬物互聯(lián)的智慧新時(shí)代
- 蘋果電腦玩全攻略 OS X 10.8 Mountain Lion
- SOA實(shí)踐者說
- 深入Linux內(nèi)核架構(gòu)與底層原理(第2版)
- Kubernetes從入門到實(shí)踐
- 一學(xué)就會(huì):Windows Vista應(yīng)用完全自學(xué)手冊(cè)
- 從實(shí)踐中學(xué)習(xí)Kali Linux無線網(wǎng)絡(luò)滲透測(cè)試
- Linux命令行大全(第2版)
- Django Project Blueprints
- Introduction to R for Quantitative Finance
- Windows 10從新手到高手
- Linux網(wǎng)絡(luò)配置與安全管理
- Heroku Cloud Application Development
- Learning BeagleBone
- Advanced Infrastructure Penetration Testing