ubuntu安装tomcat5.5
来源:互联网 发布:自动实时抓取网页数据 编辑:程序博客网 时间:2024/06/05 22:43
HOWTO: Install Tomcat 5.5
Installing Tomcat on Ubuntu
Versions:
- SDK: 1.5
- JRE: 1.5
- Tomcat: 5.5
Step 1 – Install JRE and SDK
Use the advice here to install these packages
You can verify that both items were installed corectly, by checking that you get a response when typing in terminal:
Code:java -version javac -help
Step 2 – Get tomcat
Download tomcat 5.5 from http://jakarta.apache.org/site/downloads/
In this example I am using jakarta-tomcat-5.5.9.tar.gz
Uncompress the file:
Code:tar xvfz jakarta-tomcat-5.5.9.tar.gz
N.B. To make things simpler I also renamed the package to just 'tomcat'. If you do not do this, make sure you adjust these tutorial instructions to the name of your package whenever you see 'tomcat' written.
Step 3 – Add tomcat
Place the uncompressed package in:
/usr/local/
Step 4 – Set JAVA_HOME and CLASSPATH
You need to point out where you installed Java SDK. You will have to edit the file '.bashrc'. Backup this file first!
In terminal type:
Code:gedit ~/.bashrc
Add the following lines to the file:
#Stuff we added to make tomcat go
export JAVA_HOME=/usr/lib/j2sdk1.5-sun/
export CLASSPATH=/usr/local/tomcat/common/lib/jsp-api.jar:/usr/local/tomcat/common/lib/servlet-api.jar
N.B. remember to change the word tomcat to the name of the package you placed in /usr/local.
Save and close. You will have to log out and back in again before these changes take effect.
The next steps are optional. They are for setting tomcat up to be used as a development environment.
Skip to the last step ( Step 8 ) if you just want to start tomcat how it is.
Step 5 – Change default port number
Tomcats default port number is 8080. To change it to 80 or another number do the following.
In terminal type:
Code:gedit usr/local/tomcat/conf/server.xml
Find the lines:
<Connector port="8080" ... maxThreads="150" minSpareThreads="25" ...
Adjust the port number to 80 (or any other port number you want to use), save and close.
Step 6 – Turn on Servlet reloading
In terminal type:
Code:gedit usr/local/tomcat/conf/context.xml
Find:
<Context>
Change it to:
<Context reloadable="true">
Save and close.
Step 7 – Enable Invoker Servlet
In terminal type:
Code:gedit usr/local/tomcat/conf/web.xml
Find and uncomment (remove the <-- and --> wrapped around the tags):
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>
org.apache.catalina.servlets.InvokerServlet
</servlet-class>
...
</servlet>
Also find and uncomment:
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
Save and close.
Step 8 – Start tomcat
Tomcat should now be ready to run.
In terminal type:
Code:sh /usr/local/tomcat/bin/startup.sh
If everything is working fine, you will see the following lines:
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/lib/j2sdk1.5-sun/
In your browser head to http://localhost/ and test if it is serving. If you didn't change the port number it was serving on, head to http://localhost:8080/
To stop tomcat type:
Code:sh /usr/local/tomcat/bin/shutdown.sh
- ubuntu安装tomcat5.5
- Ubuntu 8.04下安装配置Tomcat5.5
- Ubuntu 8.04下安装配置Tomcat5.5经验分享
- Ubuntu 8.04下安装配置Tomcat5.5经验分享
- tomcat5.5安装
- linux安装tomcat5.5
- 安装tomcat5.5 for linux
- tomcat5.5+JDK1.6安装
- Ubuntu下配置JDK6和Tomcat5.5
- linux安装配置jdk1.5、tomcat5.5
- TOMCAT5.5 First系列(1) -安装篇
- FreeBSD下安装配置Tomcat5.5
- Tomcat5.5的安装与配置
- Tomcat5.5中的Admin Package的安装
- jdk1.5 + tomcat5.0安装与配置
- Tomcat5.5 Admin的安装与配置
- BUGZERO安装配置(一)——TOMCAT5.5安装
- CentOS下Tomcat5.5安装(附带jdk1.6安装)
- vim高级技巧
- 正则表达式
- my ubuntu fstab configuration
- Windows Embedded CE 6.0开发初体验(五)构建CE平台
- HTML 传递参数的处理
- ubuntu安装tomcat5.5
- Ubuntu启动项设置
- 多线程设计模式之Producer Consumer
- linux下利用libpcap 得到本机网卡设备列表
- 8086/8088的内存寻址方式
- struts中的中文乱码问题
- ubuntu5.10上安装mysql-5.0.24
- "WTP+TOMCAT+AXIS"搭建WebService开发平台
- 思考-选择-努力