- 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
推薦閱讀
- Getting Started with oVirt 3.3
- Kubernetes網絡權威指南:基礎、原理與實踐
- Mastering KVM Virtualization
- macOS效率手冊
- Dreamweaver CS5.5 Mobile and Web Development with HTML5,CSS3,and jQuery
- 計算機應用基礎(Windows 7+Office 2016)
- 跟老男孩學Linux運維:Shell編程實戰
- Python UNIX和Linux系統管理指南
- Learn CUDA Programming
- Building Telephony Systems With Asterisk
- 大規模分布式系統架構與設計實戰
- Getting Started with Citrix XenApp 6.5
- 鴻蒙應用程序開發
- 微信小程序項目開發實戰:用WePY、mpvue、Taro打造高效的小程序
- Raspberry Pi Networking Cookbook