Easiest Way to install Docker and Jenkins on ubuntu for DevOps

·

1 min read

Easiest Way to install Docker and Jenkins on ubuntu for DevOps

🤖How to install docker on Ubuntu

Update your system

sudo apt-get update -y

Install docker

sudo apt-get install docker.io -y

Start Docker

sudo systemctl start docker

We have successfully installed Docker on Ubuntu

Let's check how to install Jenkins on Ubuntu

🤖How to install Jenkins on Ubuntu

First Update the Ubuntu server

sudo apt update-y

Install Java on the Ubuntu server, because Jenkins works on Java in the backend, so Java is the pre-requisite for Jenkins installation.

sudo apt install openjdk-11-jre -y

Check the Java version

sudo java -version

Now add Jenkins Key

curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null

Now again update your system

sudo apt-get update -y

Install Jenkins

sudo apt-get install jenkins -y

Go to security groups of the server and add inbound rule for port 8080 and If you see the below page on port 8080, then you have successfully installed jenkins on ubuntu.

Happy Learning!!

Thanks For Reading :)