forked from holdennguyen/cicd-pipeline-java-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstallJenkins.sh
More file actions
30 lines (20 loc) · 831 Bytes
/
InstallJenkins.sh
File metadata and controls
30 lines (20 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Ensure that your software packages are up to date on your instance by uing the following command to perform a quick software update:
yum update –y
# Add the Jenkins repo using the following command:
wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/redhat-stable/jenkins.repo
# Import a key file from Jenkins-CI to enable installation from the package:
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
yum upgrade
# Install Java:
amazon-linux-extras install java-openjdk11 -y
# Install Git:
yum install git -y
# Install Jenkins:
yum install jenkins -y
# Enable the Jenkins service to start at boot:
systemctl enable jenkins
# Start Jenkins as a service:
systemctl start jenkins
# Reference: https://www.jenkins.io/doc/tutorials/tutorial-for-installing-jenkins-on-AWS/