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

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 
主站蜘蛛池模板: 柳江县| 德州市| 保德县| 华安县| 阳东县| 通山县| 鱼台县| 孝昌县| 秭归县| 武汉市| 怀化市| 奉化市| 松桃| 措美县| 陆丰市| 柳江县| 高唐县| 如皋市| 长沙县| 建阳市| 西乡县| 含山县| 奉贤区| 眉山市| 根河市| 灌阳县| 视频| 揭阳市| 安顺市| 锦州市| 桐柏县| 富顺县| 大埔区| 绵竹市| 米林县| 宣化县| 瓦房店市| 怀集县| 积石山| 关岭| 庆城县|