Linux System Installation JDK
1. Download the Linux JDK version:
jdk-6u1-linux-i586
2. Transfer the JDK files to the server/usr/local/jdk "USR non-internal programs, commands outside the program are installed in this directory" directory,
"No JDK directory created: mkdir jdk" Send the file here
3. Enter the USR/LOCAL/JDK directory input command:
SH jdk-6u1-linux-i586.bin
4, configure the JDK information: Enter the command vi/etc/profile at the end of the following configuration can be "etc Storage System configuration File"
Java_home=/usr/local/jdk/jdk1.6.0_01
Path= $JAVA _home/bin: $PATH
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export Java_home
Export PATH
Export CLASSPATH
5. Go to the Usr/bin directory to "toggle the default JDK version execution: Fear of having the JDK installed after Linux installation so switch to your own installation"
Cd/usr/bin
Ln-s-F/USR/LOCAL/JDK/jdk1.6.0_01/jre/bin/java
Ln-s-F/USR/LOCAL/JDK/jdk1.6.0_01/bin/javac
6. At the command line, enter
Java-version
Screen output:
Java Version "jdk1.6.0_01"
Java (TM) 2 Runtime environment, Standard Edition (build jdk1.6.0_01)
Java HotSpot (TM) Client VM (build jdk1.6.0_01, Mixed mode)
Installation complete .....
Can be configured directly in Tomact without any further etc/profile
Modify Tomcat three configuration files, "tomcat/bin/catalina.sh", "tomcat/bin/setclasspath.sh".
1) Add the following two sentences (specify JDK) in the blanks at the beginning of the catalina.sh file and the setclasspath.sh file:
Export Java_home=/usr/local/java/jdk1.6.0_18export Jre_home=/usr/local/java/jdk1.6.0_18/jre
Installing JDK under CentOS 6.5