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

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 
主站蜘蛛池模板: 罗山县| 阿拉善左旗| 清涧县| 瓦房店市| 仙居县| 临夏市| 麻栗坡县| 资溪县| 石泉县| 眉山市| 邵武市| 旅游| 重庆市| 陇川县| 香港 | 五华县| 固镇县| 静海县| 耒阳市| 蒲城县| SHOW| 山西省| 舒兰市| 桂林市| 德清县| 濉溪县| 肥东县| 光泽县| 霍山县| 文成县| 岢岚县| 教育| 东乡| 延安市| 陆丰市| 林西县| 三台县| 泰宁县| 台北县| 秦皇岛市| 北海市|