Introduction to Jenkins -Install Jenkins

How to install jenkins on centos 7

image source: jenkins.io

install docker on centos

$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
$ sudo yum -y install docker-ce docker-ce-cli containerd.io

$ sudo systemctl start docker
$ sudo systemctl enable docker
$ sudo systemctl status docker

$ usermod -aG docker nanox

Install Docker Compose

$ chmod +x /usr/local/bin/docker-compose
$ docker-compose -v

Downloading the jenkins docker image

$ docker info | grep -i root
Docker Root Dir: /var/lib/docker
$ du -sh /var/lib/docker
586M /var/lib/docker

create a docker compose file for jenkins

version: '3'
services:
jenkins:
container_name: jenkins
image: jenkins/jenkins
ports:
— "8080:8080"
volumes:
— $PWD/jenkins_home:/var/jenkins_home
networks:
— net
networks:
net:

Create a Docker container for jenkins

$ docker logs -f jenkinssave password -> 
1c94a093462e46cab76f33exxxx

open browser http://192.168.88.24:8080

install suggested plugins

Thanks..

Reference: https://docs.docker.com/install/linux/docker-ce/centos/

--

--

Cloud DevOps Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store