Skip to content

Instantly share code, notes, and snippets.

@matanper
Created March 26, 2019 19:59
Show Gist options
  • Save matanper/c9940e9e57aea5da215628eb072f9725 to your computer and use it in GitHub Desktop.
Save matanper/c9940e9e57aea5da215628eb072f9725 to your computer and use it in GitHub Desktop.
Script to install openjdk 11.0.02 on centos/rhel
#!/bin/bash
tar zxvf openjdk-11.0.2_linux-x64_bin.tar.gz
mv jdk-11.0.2 /usr/local
echo "export JAVA_HOME=/usr/local/jdk-11.0.2" >> /etc/profile.d/jdk11.sh
echo "export PATH=$PATH:$JAVA_HOME/bin" >> /etc/profile.d/jdk11.sh
source /etc/profile.d/jdk11.sh
java -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment