Skip to content

Instantly share code, notes, and snippets.

@goyalmohit
Last active April 16, 2017 09:18
Show Gist options
  • Save goyalmohit/d759f7829b039faf8510785fd7706771 to your computer and use it in GitHub Desktop.
Save goyalmohit/d759f7829b039faf8510785fd7706771 to your computer and use it in GitHub Desktop.
#update list of repositories
sudo yum update
sudo reboot
#install jdk
sudo yum install java-1.8.0-openjdk.x86_64
#set export variables for java
export JAVA_HOME='/usr/lib/jvm/jre-1.8.0-openjdk'
export JRE_HOME='/usr/lib/jvm/java-8-openjdk-amd64/jre'
#install jenkins on rpm based distributions such as centos
cd ~
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
sudo yum install jenkins
#configures jenkins service to start at run time
sudo systemctl start jenkins.service
sudo systemctl enable jenkins.service
#configures firewall to allow connections on port 8080
sudo firewall-cmd --zone=public --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment