[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] How to Install Tomcat 4x on a Linux machine
- Subject: Re: [cobalt-developers] How to Install Tomcat 4x on a Linux machine
- From: Mike Wes <m_wes@xxxxxxxxx>
- Date: Mon Feb 10 01:36:01 2003
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
Hello,
Thank you all for the replies. Is it possible to make a
more step-by step manual?
For example in my case, when I tried to download Tomcat, I
found a couple of bibaries, rpm´s etc . Which one is the
good one? When I tried to install a rpm (I hope it is the
good one), the location was different then the below
refered "/opt".
And what is a symlic? A symbolic link?
The problem (of us all) in my case that the server is used
for hosting a couple of websites, what this type of server
is doing perfect! Fot that reason nobody likes up to screw
his server so everybody/some has to reïnstall their Raq
server again.
Is it possible to introduce a real step by step manual,
including the JDK and Tomcat download-links (for Tomcat I
found a jungle of packages)?
Other thing: What is Tomcat doing, what does JDK and what
is the relation between Tomcat/Apache (and what is the
worst-case scenario).
I had a programming course and want to extend it in
free-time, but my background is at this moment nhil.
Regards,
Mike Wes
--- "William L. Thomson Jr."
<support@xxxxxxxxxxxxxxxxxxxx> wrote:
> Ok,
>
> In brief there seems to be allot of people having
> problems with Tomcat
> on a Raq/Cube or just Linux in General.
>
> Here is a quick install guide.
>
> First I tend to install Tomcat or any additional software
> like my jdk in
> /opt
>
> Like
>
> /opt/jakarta-tomcat-version
> /opt/jdk-version
>
> Then I do a symlink to in the /opt dir
>
> catalina -> jakarta-tomcat-version
> jakarta-tomcat -> jakarta-tomcat-version
> jdk -> /opt/jdk-version
> jre -> /opt/jdk-version/jre
>
> That way it's easy to upgrade tomcat and anything else a
> later date.
>
> Then you need to make a file in /etc/profile.d called
> java.sh
>
> In that file you will need something like the following
> export PATH=$PATH:/opt/jdk/bin:/opt/jre/bin:/opt/
> export JAVA_HOME=/opt/jdk
> export JAVA_PATH=/opt/jdk
> export
> CLASSPATH=/opt/jdk:/opt/jdk/lib:/opt/jre:/opt/jre/lib
> export CATALINA_HOME=/opt/catalina
> export CATALINA_OPTS=-Xmx640M // to set a limit on mem
> usage
> export TOMCAT_HOME=/opt/jakarta-tomcat
> export LD_LIBRARY_PATH=/opt/jre/lib/i386
>
> The Classpath is optional in Tomcat 4.x for reason I will
> explain, but
> it's good to at least add jdk and jre to the Classpath
> like above.
>
> Now you will want to config Tomcat here is simple config,
> nothing more
> nothing less is required. This is the server.xml file
> contents
>
> <Server port="8005" shutdown="SHUTDOWN" debug="0">
> <Service name="Tomcat-Apache">
> <Connector debug="0"
> acceptCount="10"
> minProcessors="5"
> maxProcessors="75"
> port="8009"
>
> className="org.apache.ajp.tomcat4.Ajp13Connector"/>
>
> <Engine
> className="org.apache.catalina.connector.warp.WarpEngine"
> name="Apache"
> defaultHost="host.domain.com"
> debug="0"
> appBase="webapps">
>
> <!-- Global logger unless overridden at lower
> levels -->
> <Logger
> className="org.apache.catalina.logger.FileLogger"
> prefix="apache-" suffix=".log"
> timestamp="true"/>
>
> <Host name="host.domain.com" >
> <Context path=""
> docBase="/home/sites/home/web"
> crossContext="true"
> debug="0"
> reloadable="false"
> trusted="false" >
> </Context>
> </Host>
>
> </Engine>
> </Service>
> </Server>
>
> The last host one will be needed for any site that will
> use Tomcat.
>
> You will also want to create a workers.properties file in
> the
> jakarta-tomcat/conf dir that should contain the following
>
> workers.tomcat_home=/opt/catalina
>
> workers.java_home=/opt/jdk
>
> ps=/
>
> worker.list=ajp13
>
> worker.ajp13.port=8009
> worker.ajp13.host=localhost
> worker.ajp13.type=ajp13
> worker.ajp13.lbfactor=2
>
> Also you should move the to the bin dir and do a
>
> rm *.bat
>
> To get rid of the windows batch files.
>
> I also delete all files/folders in the webapps dir.
>
> Now you will need to symbolic link my preferred way or
> place any needed
> .jar files in the jakarta-tomcat/lib dir or the
> jakarta-tomcat/common/lib.
>
> As when you start Tomcat it will set it's own internal
> Classpath. That's
> why you do not really have to export one for the system
> in the java.sh
> file.
>
> I then symbolically link the catalina.sh start up file to
>
> /etc/rc.d/init.d
>
> You will then want to place a link to start it at boot
> time, or do it in
> Apache the Cobalt way, but I am not a fan of that.
>
> So in /etc/rc.d/rc3.d I will place the standard app
> startup symlink
>
> S73catalina.sh -> ../init.d/catalina.sh
>
> Ok, now tomcat is working. You now need to dial in
> Apache. You will need
> to make the mod_jk.so, or get the one out of the jdk-kit
> pkg. Or ask
> someone to email it to you. :) They usually do not need
> to be compiled
> for the specific Apache version as long as it is 1.3.x
> series. You will
> need to place it in the same dir as the other modules.
> Which on Cobalt
> machines is
>
> /usr/lib/apache/
>
>
> Now in the httpd.conf file you will need.
>
> # Setup Tomcat
> <Location ~ ".*/WEB-INF/">
> AllowOverride None
> deny from all
> </Location>
>
> <Location ~ ".*/META-INF/">
> AllowOverride None
> deny from all
> </Location>
> LoadModule jk_module modules/mod_jk.so
> JkWorkersFile /opt/catalina/conf/workers.properties
> JkLogFile /var/log/httpd/mod_jk.log
> JkLogLevel error
>
> You could put the location stuff in a different conf
> file, but later
> versions of Apache say to use one file for it all. So I
> put it in the
> main one.
>
> Then for each web site you put in the server.xml file you
> will need to
> map it to Tomcat in the virtualhost portions
>
> JkMount /*.jsp ajp13
> JkMount /servlet/* ajp13
>
> That's basically it. If you plan to use a security
> manager and etc. then
> that is up to you. As you will have many questions about
> that. From here
> consult the docs that come with Tomcat, or go to
> apache.org.
>
> I will help out with questions but will not hold your
> hand through the
> process for free. If you want to pay us, I will be more
> than happy to
> hold your hand, or install it for you.
>
> Of course when you are done restart/start tomcat, and
> then
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com