#!/bin/bash
echo "Jenkins installed successfully.."
# Shell script for installing Java, Jenkins and Maven in Ubuntu 22.0.4 EC2 instance
# Command for installing Java 17
sudo apt-get update
# Command for installing maven
sudo apt install maven -y
# Script for Jenkins installation
#Append debian package repo address to the system
# Command for installing Java 17
sudo apt-get update
sudo apt install openjdk-17-jdk -y
sudo apt install maven -y
# Script for Jenkins installation
#Add Repository key to the system
sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian-stable/jenkins.io-2026.key
echo "deb [signed-by=/etc/apt/keyrings/jenkins-keyring.asc]" \ https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null
# Install Jenkins
sudo apt update && sudo apt install jenkins -y
echo "Jenkins installed successfully.."
No comments:
Post a Comment