Skip to content

Instantly share code, notes, and snippets.

@desaijay315
Last active February 4, 2021 00:46
Show Gist options
  • Save desaijay315/a908b2c97c89454363f761938ad2f24d to your computer and use it in GitHub Desktop.
Save desaijay315/a908b2c97c89454363f761938ad2f24d to your computer and use it in GitHub Desktop.
#Remove Java 1.7
yum remove java-1.7.0*
#Install Java 1.8*
yum install java-1.8*
#Setup the jre path -
find /usr/lib/jvm/java-1.8* | head -n 3
#Open the bash file
vi .bash_profile
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.265.b01-0.54.amzn1.x86_64
PATH=$PATH:$HOME/bin:$JAVA_HOME
To verify whether the path is set properly, we need to logout and login again --- Execute below commands
exit
sudo su -
echo $JAVA_HOME //output - /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.265.b01-0.54.amzn1.x86_64
#Install Repository & key
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
#Install jenkins
yum install jenkins
#check the jenkins status
service jenkins status
#start the jenkins server
service jenkins start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment