官术网_书友最值得收藏!

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:

  1. Stop the Apache Tomcat server using the following command:
        sudo systemctl stop tomcat 
  1. Open the context.xml file for editing, which is present inside /opt/tomcat/conf:
        sudo nano /opt/tomcat/conf/context.xml
  1. 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>
  1. Add the following line between <Context> </Context>:
        <Environment name="JENKINS_HOME" value="/var/jenkins_home" 
type="java.lang.String"/>
  1. Start the Tomcat service using the following command:
        sudo systemctl start tomcat 
主站蜘蛛池模板: 凤山市| 阿巴嘎旗| 桐城市| 盐城市| 信丰县| 抚松县| 怀化市| 昭觉县| 桂东县| 牟定县| 八宿县| 沅江市| 霍林郭勒市| 大城县| 乌鲁木齐县| 靖西县| 普兰店市| 宿松县| 金塔县| 乡城县| 利辛县| 类乌齐县| 兴国县| 武鸣县| 锡林浩特市| 海阳市| 施甸县| 安图县| 靖西县| 合山市| 深圳市| 通江县| 河北省| 达孜县| 彰化县| 五河县| 尼木县| 二连浩特市| 江西省| 剑川县| 永城市|