Skip to content

Commit 13dc6d9

Browse files
rezzcodethe1Riddle
andauthored
jenkins installation script.
Co-authored-by: @the1Riddle <elvisotienomboya@gmail.com>
1 parent 3253faf commit 13dc6d9

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# Update the system
4+
sudo apt-get update
5+
6+
# Install Java (required for Jenkins)
7+
sudo apt-get install -y openjdk-11-jdk
8+
9+
# Add the Jenkins repository to the system
10+
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
11+
12+
# Add the Jenkins repository to the sources list
13+
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
14+
15+
# Update the system after adding the repository
16+
sudo apt-get update
17+
18+
# Install Jenkins
19+
sudo apt-get install -y jenkins
20+
21+
# Start Jenkins
22+
sudo systemctl start jenkins
23+
24+
# Enable Jenkins to start on boot
25+
sudo systemctl enable jenkins
26+
27+
# Display the status of Jenkins
28+
sudo systemctl status jenkins
29+
30+
# Output initial admin password
31+
echo "Initial Admin Password:"
32+
sudo cat /var/lib/jenkins/secrets/initialAdminPassword

0 commit comments

Comments
 (0)