[hodp@dataNode1 ~]$ tar -vxf server-jre-8u131-linux-x64.tar.gz
[hodp@dataNode1 ~]$ mv jdk1.8.0_131/ /u01/
[root@dataNode1 jdk1.8.0_131]# vi /etc/profile
##append code
export JAVA_HOME=/u01/jdk1.8.0_131
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
[hodp@dataNode2 jdk1.8.0_131]$ source /etc/profile
[hodp@dataNode2 jdk1.8.0_131]$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)