http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
# (1) FTP to the server after downloading
# (2) After obtaining the download link, use wget command to download
sudo mkdir -p /usr/java
sudo tar zvxf jdk-8u131-linux-x64.tar.gz -C /usr/java
vi /etc/profile
# Add under export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
export JAVA_HOME=/usr/java/jdk1.8.0_131
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
source /etc/profile
java -version
Recommended Posts