- 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
推薦閱讀
- pcDuino開發實戰
- Containerization with LXC
- Ganglia系統監控
- Ubuntu Linux操作系統
- Java EE 8 Design Patterns and Best Practices
- OpenSolaris設備驅動原理與開發
- 跟老男孩學Linux運維:Shell編程實戰
- Ubuntu Linux操作系統實用教程
- 統信UOS應用開發進階教程
- Windows Azure實戰
- Drupal 7 Mobile Web Development Beginner’s Guide
- Linux網絡操作系統項目教程(RHEL 6.4/CentOS 6.4)(第2版)
- 操作系統實用教程
- Windows XP操作系統5日通
- 操作系統教程