#!/bin/bash
# Install Jenkins
sudo apt-get install jenkins -y
echo "Jenkins installed successfully.."
# Shell script for installing Java, Jenkins and Maven in Ubuntu 22.0.4 EC2 instance
# Command for installing Java 11
sudo apt-get update
sudo apt-get install default-jdk -y
# Command for installing maven
sudo apt-get install maven -y
# Script for Jenkins installation
Append debian package repo address to the system
# Command for installing Java 11
sudo apt-get update
sudo apt-get install default-jdk -y
# Command for installing maven
sudo apt-get install maven -y
# Script for Jenkins installation
Add Repository key to the system
curl -fsSL https://pkg.jenkins.io/debian/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 binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
Perform system update
sudo apt-get update
# Install Jenkins
sudo apt-get install jenkins -y
echo "Jenkins installed successfully.."
No comments:
Post a Comment