[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] Installing Tomcat 4x on a Linux machine



On Wed, 2002-07-24 at 08:11, Developer wrote:
> William thank you for your time to put this together.
> 
> I followed every step but when I try to start Tomcat, I get
> 
> /etc/rc.d/init.d/catalina.init: /usr/java/jakarta-tomcat/bin/startup.sh: No
> such file or directory

You want to symlink the catalina.sh start up file, and use that to start
catalina. I do not use the startup.sh file. So try that.

First of, go into the dir that Tomcat is installed, and go into it's bin
dir and try to start it from there.

After you create the java.sh file in the /etc/profile.d you will need to
log out and log back in. Otherwise it will not set up the env for you.

Let me know how that goes.

Also two reasons why I put it in /opt. 

1 so it does not take up space on the root FS.

2 so I can easily backup the entire /opt dir if I need to move the stuff
to a new server.

But it can be anywhere

 
> I've checking every where to see what's happenning.  the group and owner is
> "root" and the permissions are "755"

I do not think that is the problem, but could be?

> Thanks.
> 
> 
> ----- Original Message -----
> From: "William L. Thomson Jr." <support@xxxxxxxxxxxxxxxxxxxx>
> To: "Cobalt Developers Group" <cobalt-developers@xxxxxxxxxxxxxxx>
> Sent: Tuesday, July 23, 2002 10:01 PM
> Subject: [cobalt-developers] Installing Tomcat 4x on a Linux machine
> 
> 
> > 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 apache. I do
> > not recommend starting apache before Tomcat. But that is up to you.
> >
> > I think I covered the most important stuff. So good luck, and Java on.
> >
> > --
> > Sincerely,
> > William L. Thomson Jr.
> > Support Group
> > Obsidian-Studios Inc.
> > 439 Amber Way
> > Petaluma, Ca. 94952
> > Phone  707.766.9509
> > Fax    707.766.8989
> > http://www.obsidian-studios.com
> >
> > _______________________________________________
> > cobalt-developers mailing list
> > cobalt-developers@xxxxxxxxxxxxxxx
> > http://list.cobalt.com/mailman/listinfo/cobalt-developers
> >
> >
> 
> _______________________________________________
> cobalt-developers mailing list
> cobalt-developers@xxxxxxxxxxxxxxx
> http://list.cobalt.com/mailman/listinfo/cobalt-developers
> 
-- 
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone  707.766.9509
Fax    707.766.8989
http://www.obsidian-studios.com