Hi Malhar.
I've prepared these instructions a month ago to help one of friend and for our support guys. Posting it here ... may be helpful for u ....
It is always better to read the Installation docs and make ur own list...:-)
use this as a just pointer please :-)
Installation of Tomcat: Softwares Required :
1) Apache Webserver (It's always better to use tomcat to use only as a engine to serv jsp/servlets .. instead of burdening it with other things) 2) apxs (mostely included in apache-devel)
3) J2SDK (for JRE as amish mentioned) 4) regexp (for regular expression support) 5) servletapi4 6) xerces (u can know more bout this go to apache site) 7) mod_jk / mod_webapp (This module is for apache webserver to mount some directories to serve JSP/servlets)
8) Tomcat : You can opt for tomcat 3.3.1 or tomcat 4.0.X .. the latter is preffered .. Packages required : a) Tomcat4 server b) Tomcat4 webapps c) Tomcat connectors
Procedure:
Install the above mentioned softwares ... i mean just compile .. If u r having problems for compiling them ...... GET rpm files for above (They r available)
Configurations:
Now let me post some Content of my configurations ... :
1) After Tomcat installations :
edit /etc/tomcat4/conf/tomcat4.conf and make changes according to ur configurations ...
Check {CATALINA_HOME}/webapps/
make a directory/softlink for ur directory under this, to where u want to place ur servlets/jsp files.
Edit {CATALINA_HOME}/conf/server.xml
Add this under host directive of tomcat (reffer docs for understanding wht is this!)
#=========Start
<Context path="/template" docBase="/foo/bar/mydomain/template" debug="0" reloadable="true"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="template_log." suffix=".log" timestamp="true" /> </Context>
<!-- somewhere near end u see this for connector service -- >
<!-- Define an Apache-Connector Service -->
<Engine className="org.apache.catalina.connector.warp.WarpEngine" name="host" debug="0">
<!--Replace this host with hostname specified in ur httpd.conf -->
#=========End
Add tomcat4 startup script in your operating system startup.. use /sbin/chkconfig for doing this ...
Tomcat4 runs on 8180 port by default....
2) profile entries to set environment variables
Assuming u know how to do configurations in /etc/profile
#=============start
PATH="$PATH:/usr/X11R6/bin:/usr/java/jdk1.3.1/bin:." CLASSPATH="/usr/java/jdk1.3.1/lib/td.jar:/usr/java/jdk1.3.1/lib/tools.jar:/u sr/local/mm/mm.mysql-2.0.6-bin.jar:/usr/local/javamail/javamail-1.1.3/mail.j ar:/usr/local/javamail/jaf-1.0.1/activation.jar:/usr/local/upload/lib/cos.ja r:/usr/local/jaxp1.0/jaxp.jar:/usr/share/java/servlet-2.3.jar:/usr/local/jax p1.0/parser.jar:." JAVA_HOME="/usr/java/jdk1.3.1" JDK_HOME="/usr/java/jdk1.3.1" TOMCAT_HOME="/var/tomcat4"
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME CLASSPATH JDK_HOME TOMCAT_HOME
#--------end
I've certain packages extra installed on my machine ...
i) javamail -- to support javamail ii) jaxp -- java xml parser ...... iii) mm-mysql -- mm drivers for mysql connectivity iv) upload -- These r the libraries by o'rielly to add upload support
3) HTTP configurations
I'm using mod_webapp to allow virtualhosting and mounting directories. It's easy !!!
my httpd.conf entries relevant for this ...
#========================start
<IfModule mod_webapp.c> WebAppConnection warpConnection warp localhost:8008 </IfModule>
<VirtualHost 192.168.1.10> ServerName mydomain.com ServerAlias www.mydomain.com mydomain.com DocumentRoot /foo/bar/mydomain/
# This is for mounting template to serv jsp/servlets
WebAppDeploy template warpConnection /template
</VirtualHost>
#======================= END
5) steps to start tomcat : (assuming redhat installation ..... )
Stop your httpd first...
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/tomcat4 start
/etc/rc.d/init.d/httpd start
6) check whether tomcat is running ...
If u have "lsof" utility ....
run following command
lsof |grep "LISTEN"
if u see tomcat there it is running ....
Regards, Ranjeet
(who is sorry for the line-wraps in this mail. )
Philip S Tellis writes:
On Thu, 16 May 2002, MALHAR PUJAR wrote:
Linux platform. Tom Cat server is a webserver similar to apache which can run JSP.
Tomcat isn't a full web server, it's more of a jsp/servlet engine with the ability to serve static web pages. If you read the docs, it will help you get started in setting up tomcat - it's a very simple process. You should run tomcat through apache for best performance.
After you've installed it, post again and I'll try and give you further instructions.
-- : is not an identifier