Saturday, May 16, 2020

Shell script for setting up Jenkins in Ubuntu instance | Setup Jenkins using Shell Script

#!/bin/bash
# Shell script for installing Java, Jenkins and Maven in Ubuntu 22.0.4 EC2 instance

# Command for installing Java 17
sudo apt-get update
sudo apt install openjdk-17-jdk -y

 # Command for installing maven
sudo apt-get install maven -y

# Script for Jenkins installation


#Append debian package repo address to the system
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null

# Install Jenkins

sudo apt-get update && sudo apt-get install jenkins -y

echo "Jenkins installed successfully.."

No comments:

Post a Comment

DevSecOps Bootcamp Dec 2024 Schedule | DevSecOps & AWS Azure Cloud Coaching by Coach AK | DevSecOps and Cloud Computing Online Classes

Lot of new topics covered like GitHub Actions, GitHub Advanced Security, Helm, Prometheus and Grafana..) The DevOps requirements in the IT m...