1. Check if the JDK is installed
Echo $JAVA _home
or java-version.
2, check the operating system, it is obvious that this is a very old operating system, i686 is a 32-bit operating system.
3, find the appropriate JDK version on the Oracle website, our company project version is 1.8.0_91.Https://www.oracle.com/index.html
Pull to the bottom
Find the right JDK version browser press F12 to copy the download link.
4. Installing the JDKInstalling in the/root directory
Renaming files
MV Jdk-8u91-linux-i586.tar.gz? AUTHPARAM=1490687366_107673099114A4BDD385054587B51C1B jdk-8u91-linux-i586.tar.gz
5, unzip the JDKUnzip directory I am here Unified:/usr/local
Tar xzf jdk-8u91-linux-i586.tar.gz-c/usr/local
Error:
wget Http://download.oracle.com/otn/java/jdk/8u91-b14/jdk-8u91-linux-i586.tar.gztar Xzf Jdk-8u91-linux-i586.tar.gz-c/usr/local
Baidu says the JDK provides links to HTML, not files. I'm going to go with the Thunder.
6, configuring the JDKThe Linux setup system variables are in the/root/etc/profile and/ROOT/ETC/PROFILE.D two folders. /etc/profile is a permanent environment variable and is a global variable,/etc/profile.d/set all users to take effect.
cd/etc/profile.d# vim/etc/profile.d/jdk.shexport java_home=/usr/local/jdk1.8.0_91export PATH= $JAVA _home/bin:$ Pathexport classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Let the configuration take effect:The Source command is typically used to re-execute a newly modified initialization file for immediate effect without having to log off and log back on
source/etc/profile.d/jdk.sh
----------------------------------------End-------------------------------------------------
Clap for yourself ~!!! Nice and clean.
"Linux Deployment • JDK "Installing JDK on Linux system"