Tomcat系统环境如下:
Centos 5.5
httpd-2.4.3.tar.gz
apr-util-1.4.1.tar.gz
apr-1.4.6.tar.gz
gcc编译器
jdk-6u35-linux-i586.bin
apache-tomcat-6.0.35.tar.gz
一、安装jdk
下载地址如下jdk-6u35-linux-i586.bin
wget http://download.oracle.com/otn-pub/java/jdk/6u35-b10/jdk-6u35-linux-i586.bin?AuthParam=1348640953_1fe0c668b28df0064a6c23f2595bc24b
查看jdk是否有执行权限
[root@localhost local]# ll jdk-6u35-linux-i586.bin
-rwxr-xr-x 1 root root 71758261 09-26 14:52 jdk-6u35-linux-i586.bin
开始执行
[root@localhost local]# ./jdk-6u35-linux-i586.bin
查看执行完毕的jdk目录
[root@localhost local]# cd jdk1.6.0_35/
[root@localhost jdk1.6.0_35]# ll
总计 18784
drwxr-xr-x 2 root root 4096 08-29 09:59 bin
-r--r--r-- 1 root root 3339 08-29 07:46 COPYRIGHT
drwxr-xr-x 7 root root 4096 08-29 09:59 db
drwxr-xr-x 3 root root 4096 08-29 09:59 include
drwxr-xr-x 7 root root 4096 09-26 15:00 jre
drwxr-xr-x 3 root root 4096 09-26 15:00 lib
-r--r--r-- 1 root root 40 08-29 07:46 LICENSE
drwxr-xr-x 4 root root 4096 08-29 09:59 man
-r--r--r-- 1 root root 115 08-29 07:46 README.html
-r--r--r-- 1 root root 5243 09-26 15:00 register.html
-r--r--r-- 1 root root 6689 09-26 15:00 register_ja.html
-r--r--r-- 1 root root 4846 09-26 15:00 register_zh_CN.html
-rw-r--r-- 1 root root 18970869 08-29 07:46 src.zip
-r--r--r-- 1 root root 168902 08-29 07:46 THIRDPARTYLICENSEREADME.tx
设置环境变量
[root@localhost ~]# vi /etc/profile
JAVA_HOME=/usr/local/jdk1.6.0_35/
CLASSPATH=$CLASSPATH:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
检查jdk是否安装成功
[root@localhost ~]# java -version
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode)
二、安装Tomcat
wget http://mirror.bjtu.edu.cn/apache/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz
解压缩apache-tomcat-6.0.35.tar.gz
[root@localhost tools]# tar zxvf apache-tomcat-6.0.35.tar.gz -C /usr/local/
[root@localhost tools]# cd /usr/local/apache-tomcat-6.0.35/
[root@localhost apache-tomcat-6.0.35]# ls
bin lib logs RELEASE-NOTES temp work
conf LICENSE NOTICE RUNNING.txt webapps
为了方便我们可以apache-tomcat-6.0.35改成 tomcat
三、启动Tomcat
[root@localhost bin]# /usr/local/tomcat/bin/startup.sh
显示如下显示启动成功
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar
查看8080端口已经启动
[root@localhost bin]# lsof -i:8080
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 2514 root 36u IPv6 8476 TCP *:webcache (LISTEN)