JDK
jdk 即 Java Development Kit(Java开发工具包),包括了java运行环境,基础类库和一些java工具,是java运行的基础。简单来说 凡是需要java运行的程序都需要安装jdk。
下载
登录并下载安装包
安装JDK
# pwd
/data/apps/
# ll jdk-8u411-linux-x64.tar.gz
-rw-r--r--. 1 root root 146902735 6月 18 10:34 jdk-8u411-linux-x64.tar.gz
# tar -zxvf jdk-8u411-linux-x64.tar.gz
# ln -sv jdk1.8.0_411 jdk1.8
"jdk1.8" -> "jdk1.8.0_411"
# cat /etc/profile.d/jdk.sh
export JAVA_HOME=/data/apps/jdk1.8
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}
# source /etc/profile
# java -version
java version "1.8.0_411"
Java(TM) SE Runtime Environment (build 1.8.0_411-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.411-b09, mixed mode)
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/data/apps/jdk1.8/bin:/data/apps/jdk1.8/jre/bin:/data/apps/jdk1.8/bin:/data/apps/jdk1.8/jre/bin:/data/apps/jdk1.8/bin:/data/apps/jdk1.8/jre/bin:/data/apps/jdk1.8/bin:/data/apps/jdk1.8/jre/bin
标签:bin,jdk1.8,java,JDK,data,apps,Linux,HOME,安装
From: https://www.cnblogs.com/OpenSourceSite/p/18253861