Created
September 27, 2020 04:43
-
-
Save acsrujan/0ff5169d6e5da0b8557a833b2c97afba to your computer and use it in GitHub Desktop.
script to install jsvc with java-8 on amazonlinux/centos
This file contains 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 | |
yum update -y | |
yum install wget glibc apache-commons-daemon-jsvc | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm | |
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