linux下安装配置tomcat+jdk
下载tomcat和jdk
下载地址:[url]http://tomcat.apache.org[/url]
1、jdk的安装与配置
[root@cache001 ]# ./jdk-1_5_0_06-linux-i586.bin
会逢动在该目录下生成jdk-1_5_0_06-linux-i586,并将它cp到/usr/local/java
cp -R jdk-1_5_0_06-linux-i586 /usr/local
 
vi /etc/profile
export JAVA_HOME=/usr/local/java
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export CATALINA_HOME=/usr/local/tomcat
 
使/etc/profile文件即时生效,使用source /etc/profile
启动、关闭、测试
启动
/tomcat/bin/catalina.sh start
关闭
/tomcat/bin/catalina.sh stop
测试
[url]http://127.0.0.1/jsp-examples/[/url]
如果出现tomcat的jsp-examples/页面,则成功了