How to Install Jenkins on CentOS 8


Jenkins – an open source automation server that enables developers around the world to reliably build, test, and deploy their software.

Jenkins is an open source continuous integration/continuous delivery and deployment (CI/CD) automation software DevOps tool written in the Java programming language. It is used to implement CI/CD workflows, called pipelines.

Install Jenkins on centOS 8; Through this tutorial, we will learn how to install and configure Jenkins on CentOS 8.

How to Install Jenkins on CentOS 8

Follow the following steps to install Jenkins on CentOS 8:

  • Step 1 – Install OpenJDK 8
  • Step 2 – Enable the Jenkins Repository
  • Step 3 – Install Jenkins
  • Step 4 – Enable and Start Jenkins
  • Step 5 – Adjust the Firewall
  • Step 6 – Use Jenkins

Step 1 – Install OpenJDK 8

First of all, open the terminal or command line and execute the following command into it to install OpenJDK 8 on centOS 8:

sudo dnf install java-1.8.0-openjdk-devel

Step 2 – Enable the Jenkins Repository

Once the OpenJDK installation is completed, execute the following command on the terminal or command line to enable the Jenkins repository:

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

Step 3 – Install Jenkins

Now, execute the following command on the command line or terminal to install Jenkins on centos 8:

sudo yum install jenkins

Step 4 – Enable and Start Jenkins

Once the installation process is complete, then execute the following command on terminal or command line to start the Jenkins service and enable it:

sudo systemctl start jenkins
sudo systemctl enable jenkins

Step 5 – Adjust the Firewall

Execute the following commands on the terminal or command line to open the necessary port:

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

Step 6 – Use Jenkins

To start the Jenkins setup process, open your browser and type the domain or server’s IP address followed by port 8080:

http://your_ip_or_domain:8080

Conclusion

Install Jenkins on CentOS 8; Through this tutorial, we have learned how to install and configure Jenkins on CentOS 8.



Images mentioned above related to CentOS are either copyright property of respective image owners.

Rabins Sharma Lamichhane

Rabins Sharma Lamichhane is the owner of RabinsXP who is constantly working for increasing the Internet of Things (IoT) in Nepal. He also builds android apps and crafts beautiful websites. He is also working with various social services. The main aim of Lamichhane is to digitally empower the citizens of Nepal and make the world spiritually sound better both in terms of technology and personal development. Rabins is also the first initiator of Digital Nepal.

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Appliance - Powered by TurnKey Linux