1、安装JDK1.5
2、下载tomcat 5.5.17
wget http://apache.justdn.org/tomcat/tomcat-5/v5.5.17/bin/apache-tomcat-5.5.17.tar.gz
3、解压tomcat
sudo tar zxvf apache-tomcat-5.5.17.tar.gz -C /opt
sudo mv /opt/apache-tomcat-5.5.17.tar.gz /opt/tomcat
或者
如果升级过i386=>i686内核的话则可以通过
apt-get install tomcat5.5
4、确保在/etc/environment文件中有:
CLASSPATH=/usr/share/jvm/java-1.5.0-sun/lib
JAVA_HOME=/usr/share/jvm/java-1.5.0-sun
5、启动tomcat
export CLASSPATH=/usr/share/jvm/java-1.5.0-sun/lib
export JAVA_HOME=/usr/share/jvm/java-1.5.0-sun
sudo /opt/tomcat/bin/startup.sh
或
sudo /etc/share/tomcat5.5/bin/./startup.sh
视安装目录而定
如果能看到下列提示,就表明启动成功了!
Using CATALINA_BASE: /etc/share/tomcat5.5
Using CATALINA_HOME: /etc/share/tomcat5.5
Using CATALINA_TMPDIR: /etc/share/tomcat5.5/temp
Using JRE_HOME: /usr/lib/j2sdk1.5-sun
6、测试:在地址栏中输入http://localhost:8180,Tomcat界面!(注6.10下默认端口是8180)
7、停止Tomcat服务
sudo /opt/tomcat/bin/shutdown.sh
or
sudo /etc/share/tomcat5.5/bin/./shutdown.sh
视安装目录而定
8、获得MySQL的JDBC,在Firefox浏览器的地址栏中输入http: //dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-3.1.10.tar.gz/from/http: //mysql.cbn.net.id/以得到该软件。
9、安装JDBC
tar -zxvf mysql-connector-java-3.1.10.tar.gz
sudo cp mysql-connector-java-3.1.10/mysql-connector-java-3.1.10-bin*.jar /usr/lib/j2sdk1.5-sun/lib