- 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
推薦閱讀
- 全屋互聯(lián):智能家居系統(tǒng)開發(fā)指南
- Getting Started with oVirt 3.3
- Linux實戰(zhàn)
- Linux網(wǎng)絡(luò)操作系統(tǒng)與實訓(xùn)(第三版)
- FreeRTOS實時內(nèi)核應(yīng)用指南
- Windows Phone應(yīng)用程序開發(fā)
- Dreamweaver CS5.5 Mobile and Web Development with HTML5,CSS3,and jQuery
- OpenStack系統(tǒng)架構(gòu)設(shè)計實戰(zhàn)
- Advanced TypeScript Programming Projects
- 計算機(jī)系統(tǒng)的自主設(shè)計
- Linux基礎(chǔ)使用與案例
- Python UNIX和Linux系統(tǒng)管理指南
- Agile IT Security Implementation Methodology
- Docker容器技術(shù)與運(yùn)維
- Learning Joomla! 3 Extension Development(Third Edition)