Thanks to William and to Oleg for quick replies and useful information. For what its worth, the errors Error: could not find libjava.so Error: could not find Java 2 Runtime Environment. were solved by (meticulously) re-installing the JDK. The installation itself is simple, almost trivial in fact. I have used both the rpm and binary versions a number of times this weekend in an attempt to reproduce the error but without success. Java now works but I don't know what caused the problem.
Once Java worked Tomcat standalone was immediate. I had this working previously anyway. Now on to Apache/Tomcat integration..... Thanks, John ----- Original Message ----- From: "William L. Thomson Jr." <[EMAIL PROTECTED]> To: "Cobalt Developers Group" <[EMAIL PROTECTED]> Sent: Saturday, February 08, 2003 4:06 AM Subject: [cobalt-developers] How to Install 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 > [EMAIL PROTECTED] > http://list.cobalt.com/mailman/listinfo/cobalt-developers > _______________________________________________ cobalt-developers mailing list [EMAIL PROTECTED] http://list.cobalt.com/mailman/listinfo/cobalt-developers
