OPERATING SYSTEMSOS Linux

How to install and setup Jenkins [lab environment] on Ubuntu



This is the first part of a series of Demo’s taking you through how to create a basic CICD workflow using Gitlab, Jenkins and Ansible. It’s a real-time demo so please fast forward through any slow bits!

In this demo, I’ll cover the following tasks:

• Start with a newly built Ubuntu 20.04 server
• Install pre-requisite packages
• Install Jenkins
• Install some other helpful packages like ansible, wget, git, etc
• Install the default plugins
• Login and setup the Admin user

All the commands used in the demo are below:

#!/bin/bash
# Installing Jenkins:
sudo wget -q -O – https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add –
sudo echo ‘deb http://pkg.jenkins.io/debian-stable binary/’ | sudo tee -a /etc/apt/sources.list.d/jenkins.list
sudo apt-add-repository ppa:ansible/ansible -y
sudo apt-get update
sudo apt install wget curl git python3-minimal ansible -yq
sudo apt-get -y install default-jre
sudo apt-get -y install jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins
netstat -tnlp
sudo lsof -i:8080

source
ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *