Friday, June 14, 2024
HomeCentosInstall and configure Jenkins on CentOS 8 / RHEL 8

Install and configure Jenkins on CentOS 8 / RHEL 8

Jenkins is an open-source automation server written in Java and Scala. This software allows users the ability to automate almost any task and, it saves significant time that can be better utilized addressing other issues. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery. Continuous integration (CI) is a DevOps practice in which team members regularly commit their code changes to the version control repository, after which automated builds and tests are run. Continuous delivery (CD) is a series of practices where code changes are automatically built, tested, and deployed to production. we will learn how to install Jenkins on CentOS 8. We will also explore what its purpose is and share several benefits that Jenkins offers.

Jenkins is a CI/CD tool. Here CI means continuous integration and CD means continuous delivery. Jenkins is also considered as automation tool or server, It helps to automate software development which are related to building, testing and deploying.

So, In this blog you gonna learn that how to install jenkins on CentOS 8 and RHEL 8.

Upgrade System

The very first step should update your system so everything will upto date and you will get secure.

dnf update -y

Install Java

As I mentioned earlier Jenkins is build in Java, so we have to install Java on the server so that we, can use jenkins properly.

dnf install -y java-1.8.0-openjdk

Now verify java version

java -version

Adding Jenkins Repository

Now, we will add Jenkins Repository in Centos 8 / RHEL 8 so we can install it as Jenkins did not come with centos default repository.

First install wget package if its not installed but in our case its already there.

dnf install -y wget

Then, download and enable Jenkins Repository

wget -O /etc/yum.repos.d/jenkins.repo

Now, import Jenkins GPG Key

rpm --import

Finally, install Jenkins on your CentOS 8 / RHEL 8 system

dnf install -y jenkins

Start and Enable Jenkins Service

Now you have to start jenkins service so we can use it and enable it on boot so if system will reboot jenkins will start automatically

systemctl start jenkins
systemctl enable jenkins
systemctl status jenkins

Configure Firewall

Jenkins is work on port 8080 so we need to allow conenction on that port by adding it in firewall.

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

Setting Up Jenkins

Finally everhting is working fine as jenkins is insalled successfully, now we you need to open your web browser and access jenkins using below URL:


You will see above page asking for Admin password to Unlock jenkins, when you browse the URL first time.

A path is also display on the page in which the password is saved, Go to your Linux terminal and issue following command to get the password.

cat /var/lib/jenkins/secrets/initialAdminPassword

Now, copy the password and paste it into the Administrator password box and click Continue.

Then, you will be asked if you want to install the suggested plugins or install additional plugins. I choose “install the suggested plugins” option you can choose your desired.

and the installation process will start immediately.

Now create an admin account used to manage the Jenkins server.

Then, you will ask to set Jenkins URL, set a URL or leave it as default and click on Save and Finish button.

Finally, everything has been done, click on “Start using Jenkins” button and you will be redirected to the Jenkins dashboard.

That’s about it.



Please enter your comment!
Please enter your name here

Most Popular