1.下载tomcat6 http://labs.xiaonei.com/apache-mirror/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
2. 放在任何一个你喜欢的目录下
解压
# gunzip apache-tomcat-6.0.20.tar.gz
# tar xvf apache-tomcat-6.0.20.tar
改名(不改也可以 恩恩)
# mv apache-tomcat-5.5.20 tomcat
移动Tomcat到/usr/local下(放在别的位置或许也没所谓吧。。我没试过)
# mv tomcat /usr/local/
# gunzip apache-tomcat-6.0.20.tar.gz
# tar xvf apache-tomcat-6.0.20.tar
改名(不改也可以 恩恩)
# mv apache-tomcat-5.5.20 tomcat
移动Tomcat到/usr/local下(放在别的位置或许也没所谓吧。。我没试过)
# mv tomcat /usr/local/
3. 编辑profile
# vi /etc/profile
export JAVA_HOME=/usr/jdk (等号后面的视各人的机器而定)
export CATALINA_BASE=/usr/local/tomcat
export CATALINA_HOME=/usr/local/tomcat
export PATH=$PATH:$CATALINA_HOME/bin:
export CATALINA_BASE=/usr/local/tomcat
export CATALINA_HOME=/usr/local/tomcat
export PATH=$PATH:$CATALINA_HOME/bin:
//我就加了这几个
4.启动
# cd /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/jdk
# ./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/jdk
浏览器准备。~http://localhost:8080 熟悉的丑丑的tomcat。。。