How to install Latest Jenkins on RHEL 7 Server

Prerequisites:

  1. Install Java

    sudo yum install -y java-1.8.0-openjdk
    

Install Jenkins on RHEL 7

  1. Add the Redhat repo for Jenkins.

    sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
    

To install the stable LTS version, you should dd the following repo.

 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
  1. Install the keys.

    sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
    
  2. Install Jenkins using yum.

    sudo yum install jenkins
    

To install specific version of jenkins, follow the steps given below.

  1. Find the list of version available.

    sudo yum --showduplicates list jenkins | expand
    
  2. Install specific version by following the specific syntax.

    sudo yum install <package name>-<version info>
    

For example,

  sudo yum install jenkins-2.73.1-1.1

Start Jenkins:

You can start jenkins using the following command.

 sudo systemctl start jenkins

Jenkins is an Open-Source automation software (a fork of Hudson) which can help you automate repetitive technical tasks involved in the continuous integration and delivery of software. Jenkins is written in JAVA language an currently focusing on two main purposes:

Building and testing software projects, just like CruiseControl or DamageControl. Jenkins provides an easy-to-use continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity.
Monitoring executions of externally-run jobs, such as cron jobs, even those that are run on a remote machine. Jenkins keeps those outputs and makes it easy for you to notice when something is wrong.