Jdk-- jdk when configuring tomcat
Download the rpm file of jdk: jdk-8u45-linux-x64.rpm uses this version this time.
Rpm-ivh jdk-8u45-linux-x64.rpm
/ / the path after installation is / usr/java
Cd / usr/java;ln-s jdk1.8.0_45/ jdk
Configure environment variables
Vim / etc/profile.d/java.sh
Export JAVA_HOME=/usr/java/jdk
Export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Export PATH=$JAVA_HOME/bin:$PATH
Declare environment variables
Source / etc/profile
Check whether the java is set up successfully
Java-version
When the words like this appear, the installation is successful.