Skip to content

Instantly share code, notes, and snippets.

@roberthamel
Last active March 14, 2018 00:40
Show Gist options
  • Save roberthamel/8c56542417e16660e68fbb139483bb3a to your computer and use it in GitHub Desktop.
Save roberthamel/8c56542417e16660e68fbb139483bb3a to your computer and use it in GitHub Desktop.
install jenkins on ec2
# install java 8, uninstall java 7
sudo yum install java-1.8.0
sudo yum remove java-1.7.0-openjdk
# make java 8 default
sudo /usr/sbin/alternatives --config java
sudo /usr/sbin/alternatives --config javac
# install maven
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
# install git
sudo yum install git
# install jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
sudo yum install jenkins
# start jenkins service
sudo service jenkins start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment