Created
September 21, 2015 19:20
-
-
Save jclosure/81a860251c5e45aea34b to your computer and use it in GitHub Desktop.
This is the proper way to install java in rhel/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
# installation via rpm | |
jdk-8u60-linux-x64.rpm | |
rpm -Uvh jdk-8u60-linux-x64.rpm | |
alternatives --config java | |
alternatives --config javaws | |
alternatives --config libjavaplugin.so | |
alternatives --config libjavaplugin.so.x86_64 | |
alternatives --config javac | |
# Post-Installation Setup | |
# Add JAVA_HOME environment variable to /etc/profile file or $HOME/.bash_profile | |
# Java JDK and JRE latest version (/usr/java/latest) | |
# You can make a symbolic link from your Java JDK to that directory, so it makes it easier to handle several versions of java | |
# export JAVA_HOME JDK/JRE | |
export JAVA_HOME="/usr/java/latest" | |
# e.g. echo 'export JAVA_HOME="/usr/java/latest"' >> /etc/profile | |
# Java JDK and JRE absolute version (/usr/java/jdk-8u60) or other version | |
# export JAVA_HOME JDK | |
export JAVA_HOME="/usr/java/jdk-8u60" | |
# export JAVA_HOME JRE # | |
export JAVA_HOME="/usr/java/jdk-8u60" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment