Linux下配置JDK与Tomcat
1.首先安装JDK,下载地址:http://jdk6.java.net/download.html
1 chmod +x ./jdk-6u38-ea-bin-b04-linux-i586-31_oct_2012.bin 2 ./jdk-6u38-ea-bin-b04-linux-i586-31_oct_2012.bin
2.配置环境变量
vi 、etc/profile export JAVA_HOME=/usr/local/java/jdk1.6.0_38 export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
检测JDK是否安装成功。使用如下命令检测是否成功。
#java -version
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b33)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
看到类似以上信息,则表示JDK安装配置成功。
安装tomcat:http://tomcat.apache.org/download-60.cgi#6.0.36
tar zxvf apache-tomcat-6.0.36.tar.gz cd /usr/local/tomcat ./confgure make make install cd /usr/local/tomcat/bin chmod 755 ./*.sh
配置环境变量
export CATALINA_HOME=/usr/local/tomcat export CATLINA_BASE=/usr/local/tomcat TOMCAT_HOME=/usr/local/tomcat export TOMCAT_HOME TOMCAT_BASE=/usr/local/tomcat export TOMCAT_BASE