Download the JDK version of the corresponding system on your own, usually at end of. tar.gz;
1.1 Installation Dependencies
Yum Install glibc.i686
yum–y Install libaio.so.1 libgcc_s.so.1 libstdc++.so.6
Yum Update libstdc++-4.4.7-4.el6.x86_64
Yum Install gcc-c++
1.2 Check that the system has been installed before the JDK software, if installed, uninstall
Rpm–qa | grep–i jdk
parameter explanation: Q means that query a represents all | pipe character I represents ignoring the case JDK program name
rpm–e--nodeps Program name
parameter explanation: E for eraser, erase nodeps to delete dependent other packages
1.3 Installing the JDK
1.3.1 Creating the installation directory
MKDIR–P/USR/LOCAL/JDK
parameter Explanation: p represents the recursive creation of the directory, representing parents, which can be interpreted as:
to create the JDK file, if the/usr/local is present and not created, but does not exist, create
1.3.2 Uploading a JDK installation package
Here you can set up a folder to store the software you need to install in this folder
can be used: mkdir-p/usr/software
1.3.3 Decompression
TAR-ZXVF program file name-c/usr/local/jdk
parameter explanation: Z: Unzip. Gzip end of, X: Extract execution, V: Display procedure, F: This parameter must be the last parameter followed by the name of the file to be decompressed.
1.3.4 Configuring environment variables
Vim/etc/profile Add the following information at the end
Export java_home=/usr/local/java/jdk1.7.0_80
export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $JAVA _home/bin: $PATH
1.3.5 Reload environment variable configuration file
Source/etc/profile
1.3.6 test is successful java–version
Installing JDK under Linux