软件
JDK下载:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
[root@web /]# mkdir /usr/local/tools [root@web /]# cd /usr/local/tools/ [root@web tools]# tar xf jdk-8u131-linux-x64.tar.gz [root@web tools]# ls jdk1.8.0_131 jdk-8u131-linux-x64.tar.gz [root@web tools]# mv jdk1.8.0_131/ /usr/local/ [root@web tools]# vim /etc/profile.d/jdk.sh [root@web tools]# cat /etc/profile.d/jdk.sh export JAVA_HOME=/usr/local/jdk1.8.0_131 export PATH=$JAVA_HOME/bin:$PATH:$JAVA_HOME/jre/bin export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib [root@web tools]# source /etc/profile.d/jdk.sh [root@web tools]# 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)
本文出自 “十里春风” 博客,请务必保留此出处http://visitor.blog.51cto.com/11247238/1956799
原文地址:http://visitor.blog.51cto.com/11247238/1956799