Skip to content

Instantly share code, notes, and snippets.

@binario200
Last active August 16, 2018 23:15
Show Gist options
  • Save binario200/b4cbb7b9b331a55c7423b02d30f16ebd to your computer and use it in GitHub Desktop.
Save binario200/b4cbb7b9b331a55c7423b02d30f16ebd to your computer and use it in GitHub Desktop.
Jenkins installation at centos

In order to use Jenkins as part of a CI/CD solution, you must first know how to install it. This lesson will take you through the steps necessary in order to install Jenkins and prepare it for use in a CI process. It provides a demonstration of installing Jenkins on a CentOS environment using yum. After completing this lesson, you should be able to perform a Jenkins installation yourself.

Jenkins installation docs: https://jenkins.io/doc/book/installing/


Jenkins wiki on installing Jenkins in a CentOS environment: https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions

Here are the commands used to install Jenkins in the demonstration:

sudo yum -y remove java
sudo yum -y install java-1.8.0-openjdk
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
sudo yum -y install jenkins-2.121.1
sudo systemctl enable jenkins
sudo systemctl start jenkins

Jenkins and Docker

sudo yum -y install docker
sudo systemctl start docker
sudo systemctl enable docker
sudo groupadd docker
sudo usermod -aG docker jenkins
sudo systemctl restart jenkins
sudo systemctl restart docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment