How one can Set up Jenkins on CentOS eight

How one can Set up Jenkins on CentOS eight


Linux Articles / All 32 Views comments

Jenkins is the preferred open-source, Java-based automation server that permits you to simply arrange a steady integration and steady supply (CI/CD) pipeline.

Steady integration (CI) is a DevOps follow through which workforce members commonly commit their code modifications to the model management repository, after which automated builds and checks are run. Steady supply (CD) is a collection of practices the place code modifications are mechanically constructed, examined, and deployed to manufacturing.

This tutorial covers the steps to put in Jenkins on CentOS eight from the official Jenkins repository.

Putting in Jenkins

Carry out the next steps as root or user with sudo privileges to put in Jenkins on CentOS eight:

  1. Jenkins is written in Java, so step one is to put in Java. Jenkins requires Java variations eight and 11, however some Jenkins plugins is probably not compilable with Java eight.

    We’ll set up OpenJDK eight:

    sudo dnf set up java-1.eight.Zero-openjdk-devel

    If in case you have a number of variations of Java put in in your system, make sure that Java eight is the default Java version.

  2. The subsequent step is to allow the Jenkins repository. Run the next instructions to obtain the repo file and import the GPG key:

    sudo wget -O /and so forth/yum.repos.d/jenkins.repo
    sudo rpm --import
  3. Set up the newest secure model of Jenkins by typing:

    sudo yum set up jenkins

    As soon as the set up course of is full, begin the Jenkins service and allow it to start out on system boot:

    sudo systemctl begin jenkins
    sudo systemctl allow jenkins

    To examine whether or not Jenkins is operating, sort:

    systemctl standing jenkins

    The output ought to look one thing like this:

    Loaded: loaded (/and so forth/rc.d/init.d/jenkins; generated)
    Lively: lively (operating) since Thu 2019-10-31 21:31:36 UTC; 3s in the past

Adjusting the Firewall

In case you are putting in Jenkins on a distant CentOS server that's protected by a firewall, it's essential port 8080.

Use the next instructions to open the required port:

sudo firewall-cmd --permanent --zone=public --add-port=8080/tcp
sudo firewall-cmd --reload

Setting Up Jenkins

To start out the Jenkins setup course of, open your browser and sort the area or server’s IP tackle adopted by port 8080:


A display just like the next will seem, prompting you to enter the Administrator password that's created in the course of the set up:

Use cat to show the password on the terminal:

sudo cat /var/lib/jenkins/secrets and techniques/initialAdminPassword

It is best to see a 32-character lengthy alphanumeric password, as proven under:


Copy the password from the terminal, paste it into the “Administrator password” area and click on “Proceed”.

On the subsequent display, you may be requested whether or not you need to set up the instructed plugins or to pick the plugins to put in. Click on on the “Set up steered plugins” field and the set up course of will begin.

As soon as the set up is full, you'll be prompted to arrange the primary administrative consumer. Fill out all required info and click on “Save and Proceed”.

On the subsequent web page, the installer will ask you to set the URL for the Jenkins occasion. The URL subject shall be populated with an routinely generated URL.

To finish the setup, affirm the URL by clicking on the “Save and End” button.

Lastly, click on on the “Begin utilizing Jenkins” button, and you may be redirected to the Jenkins dashboard logged in because the admin consumer you might have created in one of many earlier steps.

When you’ve reached this level, you’ve efficiently put in Jenkins in your CentOS system.


On this tutorial, we have now proven you methods to set up and full the preliminary configuration of Jenkins on CentOS/RHEL based mostly methods.

Now you can go to the official Jenkins documentation web page and begin exploring Jenkins’s workflow and plug-in mannequin.

In case you have any questions, please depart a remark under.