linux (centOS7) mounted configure the environment variables jdk

jdk Download

 

 

The compressed package after downloading jdk placed in / usr / local directory

tar -zxvf  jdk-8u231-linux-x64.tar.gz  

Modify the directory name

mv jdk-8u231-linux-x64   java

Configuration environment variable

vi / etc / profile # global configuration environment variable file 
# add content to look at the bottom of the configuration file 
Export JAVA_HOME = / usr / local / the Java 
Export the PATH = $ the PATH: $ JAVA_HOME / bin 
# Save and exit 
source / etc / profile # the configuration file to take effect

 Face to view the configuration of the environment is in effect

jps # or java -version

 

 If wrong, please point out!

 

 

 

 

Guess you like

Origin www.cnblogs.com/luyun-blog/p/11535562.html