How to Install Jenkins on CentOS 7

  • 10


In our previous article, we discussed top open source continuous integration(CI) toolsJenkins is an open source CI (Continuous Integration) tool written in Java, which is widely used for project development, deployment, and automation. Jenkins helps to automate the non-human part of software development process, with continuous integration and facilitating technical aspects of continuous delivery.

This article will guide you through the process of installing Jenkins on a CentOS 7 server instance.



Step 1 – Update CentOS 7 system

devops@localhost$ sudo yum install epel-release
devops@localhost$ sudo yum update
devops@localhost$ sudo reboot

Step 2 – Install Java
Java is the primary requirement of Jenkins. So, you need to install Java on your system. Make sure you have installed JDK, not JRE. For java installation visit how to install java on centos.

devops@localhost$ java -version

java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)


Install Jenkins

1 – Add the Jenkins repository to the yum repos, and install Jenkins from here.

devops@localhost$ sudo wget -O /etc/yum.repos.d/jenkins.repo
devops@localhost$ sudo rpm --import
devops@localhost$ sudo yum install jenkins

2 – Start the Jenkins service and set it to run at boot time.

devops@localhost$ sudo systemctl start jenkins.service
devops@localhost$ sudo systemctl enable jenkins.service

3 – Allow traffic through TCP port 8080 into system’s firewall.

devops@localhost$ sudo firewall-cmd --add-port=8080/tcp
devops@localhost$ sudo firewall-cmd --add-port=8080/tcp --permanent
devops@localhost$ sudo firewall-cmd --reload

4 – Launch Jenkins (http://localhost:8080) to verify that you can access the web interface.

That’s it from the Jenkins installation, now you can configure Jenkins which includes unlock Jenkins, install suggested plugins and then create sample project.  For more information, please visit Jenkins official documentation.

In our another article you can find Jenkins installation using Ansible playbook or role.


Avinash Pawar

An automation enthusiast who presently working as DevOps Engineer.

More Posts - Website

Follow Me:
TwitterFacebookLinkedInGoogle Plus

Avinash Pawar

An automation enthusiast who presently working as DevOps Engineer.