Thursday, 9 April 2020

Jenkins Installation

Some verions of CentOS ship with a java version that is not compatible with Jenkins, so you may have to remove it.

sudo yum -y remove java

Install java. Jenkins also works on the official Oracle JDK. Using OpenJDK just because it is a bit easier to install.

sudo yum -y install java-1.8.0-openjdk

Since Jenkins is not part of the default yum repositories, so we need to run the following commmand

sudo yum install epel-release
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

Install Jenkins using yum

sudo yum -y install jenkins-2.164.2

Enable the Jenkins service

sudo systemctl enable jenkins

Start the Jenkins service

sudo systemctl start jenkins

You can now access Jenkins on your browswer.

The next step is to unlock Jenkins. run cat on /var/lib/jenkins/secrets/initialAdminPassword and copy the password and paste to the browser.

After a few minutes, setup your first admin user. Once finished, Jenkins is fully installed and set up.

No comments:

Post a Comment

A Fun Problem - Math

# Problem Statement JATC's math teacher always gives the class some interesting math problems so that they don't get bored. Today t...