Originally published October 26, 2016 @ 12:46 am
Below is shorthand for installing alternative versions of Java on your RHEL/CentOS system. This may come in useful for the purposes of testing.
# Set version, update, and filename
v="jdk1.8.0_101"
r="8u101-b13"
f="jdk-8u101-linux-x64.tar.gz"
cd /opt
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/${r}/${f}"
tar xzf ${f} && /bin/rm -f ${f}
cd /opt/${v}
alternatives --install /usr/bin/java java /opt/${v}/bin/java 2
alternatives --install /usr/bin/jar jar /opt/${v}/bin/jar 2
alternatives --install /usr/bin/javac javac /opt/${v}/bin/javac 2
alternatives --set jar /opt/${v}/bin/jar
alternatives --set javac /opt/${v}/bin/javac
export JAVA_HOME=/opt/${v}
export JRE_HOME=/opt/${v}/jre
export PATH=$PATH:/opt/${v}/bin:/opt/${v}/jre/bin
cat >> /etc/environment << EOF
JAVA_HOME=/opt/${v}
JRE_HOME=/opt/${v}/jre
PATH=$PATH:/opt/${v}/bin:/opt/${v}/jre/bin
EOF
Interactive step – select default Java version and verify
alternatives --config java java -version

Experienced Unix/Linux System Administrator with 20-year background in Systems Analysis, Problem Resolution and Engineering Application Support in a large distributed Unix and Windows server environment. Strong problem determination skills. Good knowledge of networking, remote diagnostic techniques, firewalls and network security. Extensive experience with engineering application and database servers, high-availability systems, high-performance computing clusters, and process automation.





















