Install JDK installation on linux server

1. Prepare the jdk1.8 installation package

1.1. Upload the local linux version of the jdk1.8 installation package to the server through the connection tool

insert image description here
insert image description here

1.2. Move the jdk installation package to the specified location

insert image description here

1.3. Go to the /usr/local folder

insert image description here

2. Unzip the JDK installation package

insert image description here

3. Configure the JDK variable environment

insert image description here

3.1. Configure the subordinate environment variables in the /etc/profile file

insert image description here

export  JAVA_HOME=/usr/local/jdk1.8.0_121
export  CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/
export  PATH=$PATH:$JAVA_HOME/bin

3.2. Refresh the environment variable to make it take effect

insert image description here

3.3. Check whether the JDK is installed successfully

insert image description here

Guess you like

Origin blog.csdn.net/qq_46112274/article/details/123164753