http://doc.gwos.org/index.php/Install_tomcat_5.5
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: |
|
Add the following lines to the file:
File:~/.bashrc |
#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:
Code: |
<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:
File:/usr/local/tomcat/conf/context.xml |
|
Change it to:
File:/usr/local/tomcat/conf/context.xml |
<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):
File:/usr/local/tomcat/conf/web.xml |
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>
org.apache.catalina.servlets.InvokerServlet
</servlet-class>
...
</servlet>
|
Also find and uncomment:
File:/usr/local/tomcat/conf/web.xml |
<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:
File:/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/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
|
I hope this helped!
If you have any problems, I recommend this site for more details: http://www.coreservlets.com/
分享到:
相关推荐
面是我在Ubuntu6.06 LTS 下源码编译安装samba主要安装过程,本人第一次用Ubuntu,刚装上去时候,没有gcc编译环境。郁闷了半天。找出这一过程发了不少的时间。可能还有些不妥,不过我经过这样的安装达到了向windows共享...
Installing STLinux on Ubuntu
Installing RAC on AIX
OpenERP Installing Ubuntu9.04
Installing MIUI on Meizu MX2
\Installing RAC on AIX 001.pdf
Installing Activ Test on Your PC
Microsoft Windows 2000 Scripting Guide - Installing Software on a Remote Computer
Installing Your Driver on Windows Millennium INF File Guide
Installing Ubuntu—Getting started 11 Finishing Installation 16 2 The Ubuntu Desktop 19 Understanding the Ubuntu desktop 19 Unity 19 The Launcher 21 The Dash 21 Workspaces 24 Managing windows 24 Unity...
Installing Ubuntu 14.04 & ROS & TurtleBot 06-29-2016 个人小结,关于Ubuntu和ROS的安装。
Failed to install Tomcat6 service(Tomcat6安装失败解决方法)
quantum espresso 视频可以认真学习 进行入门,非常不错的材料 给大家进行分享,值得拥有
Installing Oracle Database 11g on Linux
Installing Oracle 10G On Linux
Installing and configuring Ubuntu to ensure secure installations Virtual Ubuntu and LDAP configuration Full network and web services management What you’ll learn Administer, install, and configure ...
Updated for the latest version of Tomcat, this new edition offers a complete guide to installing, configuring, maintaining and securing this servlet container. In fact, with such a wealth of new ...
One way of doing it is using mod_php5 Apache module to serve PHP 5.3 applications, while running PHP 5.2 applications using fastcgi module. Under Ubuntu 12.04 this can be achieved by installing ...
The Ubuntu Server Guide contains information on how to install and configure various server applications on your Ubuntu system to fit your ...installing Ubuntu, refer to the Ubuntu Installation Guide.
Requirements For Installing Oracle10gR2 On RHEL 5&OEL 5 (x86_64)