Created
July 11, 2018 20:06
-
-
Save joshy91/912cd6588269549e3a3a106a22d2d8cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Installs Java 8 and Jenkins on Debian based machine such as Ubuntu | |
#Run if a java version greater than java 8 is installed | |
#sudo apt-get -y remove java | |
sudo apt-get -y install java-1.8.0-openjdk | |
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - | |
#Appends sources lists to include jenkins pkg repo | |
echo 'deb https://pkg.jenkins.io/debian binary/' >> /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get -y install jenkins | |
sudo systemctl enable jenkins | |
sudo systemctl start jenkins | |
#Prints initial admin password to configure jenkins | |
sudo cat /var/lib/jenkins/secrets/initialAdminPassword |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment