JDK Installation
Most of the services are inseparable from the Java environment, CentOS is OPENJDK, obviously we still use Java JDK good. (Note: Minimal version does not have OPENJDK installed, other versions need to delete this.) )
JDK Download
Download the tar.gz version of the JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
Use SSH to upload to/opt.
Installation
# cd/opt # tar xzvf *.tar.gz # MV *.tar.gz JDK < —--"*" is the version of the JDK you download, here is a lot of characters to the JDK, look comfortable, do not change, note the following configuration
Configure system settings
Add at the end of the/etc/profile file
Export java_home=/opt/JDK <---Here is the installation directory for your JDK, with the MV modified above, you need to write the whole bunch of characters here export PATH=$JAVA _ HOME/bin:$PATHexport CLASSPATH=.:$JAVA _home/lib/dt.jar:$JAVA _home/lib/ Tools.jar
Execute the command that makes the configuration information effective immediately source
# source/etc/profile//This command is for the configuration to take effect immediately.
Test
# Java–version <---Displaying Java version information indicates that the JDK installation is complete
CentOS Learning Note--JDK installation