Prerequisites:
-
Install Java
sudo yum install -y java-1.8.0-openjdk
Install Jenkins on RHEL 7
-
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
-
Install the keys.
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
-
Install Jenkins using yum.
sudo yum install jenkins
To install specific version of jenkins, follow the steps given below.
-
Find the list of version available.
sudo yum --showduplicates list jenkins | expand
-
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