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

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 
主站蜘蛛池模板: 南投市| 吉木乃县| 远安县| 镇平县| 莫力| 潜江市| 柞水县| 枞阳县| 兴文县| 安达市| 普洱| 会昌县| 乌鲁木齐市| 北海市| 武邑县| 河池市| 祁连县| 临清市| 司法| 翁牛特旗| 班戈县| 周口市| 高陵县| 苍南县| 缙云县| 定南县| 吉安市| 成武县| 长汀县| 万年县| 邯郸市| 弥渡县| 徐闻县| 利津县| 冀州市| 三原县| 巩留县| 中江县| 安陆市| 沈阳市| 兴义市|