Updated on 2025-06-30 GMT+08:00

Preparing the Jenkins Environment

Environment Description

If the Jenkins environment has been installed, skip this section.

Install Jenkins on a Linux VM. The following lists the environment information used in this practice. If you use an image for deployment, install Docker on the VM.

  • VM: CentOS 7.9
  • Jenkins: 2.331
  • Git: installed using yum
  • JDK: 11.0.8
  • Apache Maven: 3.8.6

Note:

The following parameter needs to be added to start Jenkins:
-Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION=true

Otherwise, GitLab fails to interconnect with Jenkins. The error is as follows:

HTTP Status 403 - No valid crumb was included in the request

Downloading and Installing Related Software

Verifying the Installation

  • Git
    • Git
      [root@ecs-jenkins ~]# git version
      git version 1.8.3.1
    • JDK
      [root@ecs-jenkins jar]# java -version
      openjdk version "1.8.0_345"
      OpenJDK Runtime Environment (build 1.8.0_345-b01)
      OpenJDK 64-Bit Server VM (build 25.345-b01, mixed mode)
    • Maven
      [root@ecs-jenkins jar]# mvn -v
      Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
      Maven home: /root/app/maven/apache-maven-3.8.6
      Java version: 11.0.8, vendor: Huawei Technologies Co., LTD, runtime: /root/app/jdk11/jdk-11.0.8
      Default locale: en_US, platform encoding: UTF-8
      OS name: "linux", version: "3.10.0-1160.76.1.el7.x86_64", arch: "amd64", family: "unix"
    • Docker
      [root@ecs-jenkins jar]# docker version
      Client:
       Version:         1.13.1
       API version:     1.26
       Package version: docker-1.13.1-209.git7d71120.el7.centos.x86_64
       Go version:      go1.10.3
       Git commit:      7d71120/1.13.1
       Built:           Wed Mar  2 15:25:43 2022
       OS/Arch:         linux/amd64
      Server:
       Version:         1.13.1
       API version:     1.26 (minimum version 1.12)
       Package version: docker-1.13.1-209.git7d71120.el7.centos.x86_64
       Go version:      go1.10.3
       Git commit:      7d71120/1.13.1
       Built:           Wed Mar  2 15:25:43 2022
       OS/Arch:         linux/amd64
       Experimental:    false
    Figure 1 Version check