1、下载apache-tomcat-7.0.10.tar.gz
路径:,默认是桌面
2、解压
#tar xvf apache-tomcat-7.0.10.tar.gz (生成apache-tomcat-7.0.10)
#cp apache-tomcat-7.0.10 /usr/
3、设置环境变量 vi /etc/profile,这个容易错,最后面几行如下:
export JAVA_HOME=/usr/java/jdk1.6.0_24
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export CATALINA_HOME=/usr/apache-tomcat-7.0.10
export PATH=$PATH:$JAVA_HOME/bin
export TOMCAT_HOME=/usr/apache-tomcat-7.0.10
4、启动Tomcat
进入/usr/apache-tomcat-7.0.10/bin目录,运行启动脚本startup.sh,注意./startup.sh后的输出
[root@localhost apache-tomcat-7.0.10]# cd bin
[root@localhost bin]# pwd
/usr/apache-tomcat-7.0.10/bin
[root@localhost bin]# ./startup.sh
Using CATALINA_BASE: /usr/apache-tomcat-7.0.10
Using CATALINA_HOME: /usr/apache-tomcat-7.0.10
Using CATALINA_TMPDIR: /usr/apache-tomcat-7.0.10/temp
Using JRE_HOME: /usr/java/jdk1.6.0_24
Using CLASSPATH: /usr/apache-tomcat-7.0.10/bin/bootstrap.jar:/usr/apache-tomcat-7.0.10/bin/tomcat-juli.jar
5、reboot,重启机器
6、重启后,在Firfox浏览器输出 ,显示Apache Tomcat/7.0.10的主页,!说明配置成功了。
阅读(878) | 评论(0) | 转发(0) |