Jenkins is an open-source automation tool written in Java with plugins built for Continuous Integration purpose that allows you to build pipelines to automate the process of building, testing and deploying applications.

Initially Jenkins was developed as Hudson project. Hudson's creation started in summer of 2004 at Sun Micro-systems. During January 2011 the project name was changed from "Hudson" to "Jenkins".

In this guide we are going to see how to install Jenkins, create a Jenkins pipeline in centOS 7.6

Prerequisites :

OS : CentOS 7.6

Step 1 :

Disable SELinux,

#vi /etc/sysconfig/selinux

change  "SELINUX=enforcing"  to "SELINUX=disabled"

Reboot the server.

Jenkins is a Java  application so we need to install Java first in the server,

Install latest epel repository,

#yum install epel-release -y

Install Java,

#yum install java -y

Verify the java version,

# java -version

The current version of Jenkins does not support Java 10/11. If you have multiple versions of Java installed on your machine make sure Java 8 is the default Java version.

Step 2 :

Install Jenkins,

use official YUM repository to install latest stable Jenkins version,
#wget -O /etc/yum.repos.d/jenkins.repo

#rpm --import

#yum install jenkins -y

Now start Jenkins service,

#systemctl start jenkins

#systemctl status jenkins

Step 3 :

Access Jenkins in web portal,

Default jenkins port is, 8080. Allow 8080 port in firewall and access Jenkins in browser by,


First time it will ask to unlock the Jenkins by automatically generated password which is in below location.

#cat /var/lib/jenkins/secrets/initialAdminPassword

Copy the automatically generated password and paste it in Jenkins and click continue.

In next page, click "Install suggested plugins"

Next it will ask us to create admin credentials, Give the required details and do "save and continue".

Verify the Jenkins URL and click "save and finish"

Installation is completed. Now click "start using Jenkins"

Step 4 :

Now click "Create new jobs" and create a test freestyle project.

Then click OK it will open the next page, where we need to give our inputs. here i will give a  test build to execute.

In execute shell give,  echo "This is test" and click save.

Now click "Build Now", Jenkins will initiate the project and execute which we have given in execute shell,

We can see the output of the project by choosing the build id from build history(left side). then click console output like below image.

Finally the Jenkins Dashboard looks like this,

That's it, Now you can install Jenkins and automate your manual deployment.

There are plenty of Jenkins plugins are available, you can get it from here,  and integrate with Jenkins.

Post a Comment

Previous Post Next Post