Skip to content

Instantly share code, notes, and snippets.

Created September 27, 2020 04:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
script to install jsvc with java-8 on amazonlinux/centos
yum update -y
yum install wget glibc apache-commons-daemon-jsvc
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"
rpm -Uvh jdk-8u152-linux-x64.rpm
alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_152/jre/bin/java 20000
alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0_152/bin/jar 20000
alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_152/bin/javac 20000
alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.8.0_152/jre/bin/javaws 20000
alternatives --set java /usr/java/jdk1.8.0_152/jre/bin/java
alternatives --set javaws /usr/java/jdk1.8.0_152/jre/bin/javaws
alternatives --set javac /usr/java/jdk1.8.0_152/bin/javac
alternatives --set jar /usr/java/jdk1.8.0_152/bin/jar
rm -f jdk-8u152-linux-x64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment