Last active
July 11, 2018 20:20
-
-
Save joshy91/1e8c593a232ee2219107ccd666ea85a1 to your computer and use it in GitHub Desktop.
Install Jenkins on Centos7
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 CentOS7 | |
#Run if a java version greater than java 8 is installed | |
#sudo apt-get -y remove java | |
sudo yum -y install java-1.8.0-openjdk | |
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key | |
sudo yum -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