At just, I bought a server
Very, very happy, although played virtual machine, but! The feeling is not the same
All today's walk through the process
In the Linux system installation JDK
Link: https: //pan.baidu.com/s/16lCCn8yUdBtHOJ36UiM6TA
extraction code: 4b5p
Note: JDK here is Linux environment
two.
Into the / opt directory, JDK installation package after viewing uploaded
![](https://img2020.cnblogs.com/blog/1963588/202003/1963588-20200322001108546-413665183.png)
Use tar command to decompress the installation package mounting operation
tar -zxvf jdk-8u171-linux- x64.tar.gz
![](https://img2020.cnblogs.com/blog/1963588/202003/1963588-20200322001201679-1202635422.png)
After extracting View Results
Renaming for extracting package, this step is not necessary, primarily for the convenience of rear configure the environment variables
mv jdk1.8.0_171 / jdk1.8
![](https://img2020.cnblogs.com/blog/1963588/202003/1963588-20200322001700052-1876200828.png)
Configuration environment variable
Edit / etc / profifile file
vi / etc / profile
![](https://img2020.cnblogs.com/blog/1963588/202003/1963588-20200322001903984-849831120.png)
Profifile came to the end of the file, enter the edit mode
o
enter the edit mode
![](https://img2020.cnblogs.com/blog/1963588/202003/1963588-20200322002110150-223218455.png)
Increase JAVA_HOME and PATH environment variable to two
# JAVA_HOME
export JAVA_HOME=/opt/jdk1.8
# PATH
export PATH=$PATH:$JAVA_HOME/bin
Explanation: $ PATH environment variable path is to get itself has been configured
:( colon) is delimited effect equivalent windows system configured comma
Note After he finished press the Esc key on the keyboard to exit edit mode
Enter: wq Enter a timely manner to save and exit
Using the source command file to take effect
![](https://img2020.cnblogs.com/blog/1963588/202003/1963588-20200322002445833-1288620291.png)
Test javac and java command is available (it could be possibly Chinese English it does not matter)
![](https://img2020.cnblogs.com/blog/1963588/202003/1963588-20200322002600275-425086650.png)
Use
java -version
command to view the currently installed version of jdk
![](https://img2020.cnblogs.com/blog/1963588/202003/1963588-20200322002724117-531846396.png)
End END!