Configuring JDK+TOMCAT Environment under Linux environment
Recently learning Java, one of the most important is to configure the JDK environment, and in the JDK in conjunction with Tomcat development based on the application, so this is recorded here.
Configuration environment: The system Environment: CentOS 6.3 64-bit, Jdk:jdk-6u29-linux-x64.bin, Tomcat:apache-tomcat-6.0.35.zip here is the JDK installation should be the same as the number of system bits, here I The system is 64 bits so the JDK is used 64 bits.
Start configuration: Here I will install the software, upload to the/usr/loca/directory, using the RZ tool upload, completed after the start configuration.
[Email protected] local]# pwd
/usr/local
[email protected] local]# LL | grep jdk-6u29-linux-x64.bin
-rw-r--r-x. 1 root root 85411605 September 4 jdk-6u29-linux-x64.bin
[email protected] local]# LL | grep apache-tomcat-6.0.35.zip
-rw-r--r--. 1 root root 8429450 October apache-tomcat-6.0.35.zip
Give Jdk-6u29-linux-x64.bin Execute permission, chmod o+x Jdk-6u29-linux-x64.bin then execute directly,./jdk-6u29-linux-x64.bin script command execution, configured as prompted, After the JDK configuration is complete, you need to configure environment variables, edit/etc/profile This file adds the following lines of information at the end of the file,
java_home=/usr/local/ jdk1.6.0_29
classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
path= $JAVA _home/bin: $PATH
then keep rolling, source/etc/profile make the configuration file effective.
View the JDK Environment
[Email protected] local]# java-version
Java Version "1.6.0_29"
Java (TM) SE Runtime Environment (build 1.6.0_29-B11)
Java HotSpot (TM) 64-bit Server VM (build 20.4-b02, Mixed mode)
Configure Tomcat unzip Apache-tomcat-6.0.35.zip to unzip the zip package directly. Tomcat all related profiles are created in the folder after Tomcat decompression, where the bin/directory is Tomcat's startup directory started Tomcat can be directly manipulated:
The default port after Tomcat starts is: 8080 You can use the port command to see if Tomcat listens
[Email protected]/]# lsof-i:8080
COMMAND PID USER FD TYPE DEVICE size/off NODE NAME
Java 4926 root 38u IPv6 157999 0t0 TCP *:webcache (LISTEN)
Here, JDK and Tomcat are configured to complete.
This article is from "Irene's Blog" blog, please be sure to keep this source http://adson10.blog.51cto.com/6283173/1541151