But when i checked the tomcat port., I saw this
/usr/local/java/jakarta-tomcat-5.5.3/bin]# netstat -lpn |grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 25379/java
please advice
But when i checked the tomcat port., I saw this
/usr/local/java/jakarta-tomcat-5.5.3/bin]# netstat -lpn |grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 25379/java
please advice
Originally Posted by sujai
Edit /usr/sbin/starttomcat
Change
ToCode:"-Djava.endorsed.dirs=../common/endorsed", "org.apache.catalina.startup.Bootstrap", "-debug","-outfile","../logs/catalina.out", "-errfile","../logs/catalina.err","-verbose","-security");
Code:"-Djava.endorsed.dirs=$ENV{JAKARTA_HOME}/common/endorsed", "org.apache.catalina.startup.Bootstrap", "-debug","-outfile","$ENV{JAKARTA_HOME}/logs/catalina.out", "-errfile","$ENV{JAKARTA_HOME}/logs/catalina.err","-verbose","-security");
Regards,
David
Forum Moderator
Hello,
Now that error is gone.. And this is what is got from ps ax |grep tomcat
/usr/local/jakarta/jakarta-tomcat-5.0.28/bin]# ps ax |grep tomcat
25379 pts/2 S 0:04 /usr/local/java/j2sdk1.4.2_05//bin/java -Djava.endorsed.dirs=/usr/local/java/jakarta-tomcat-5.5.3//common/endorsed -classpath /usr/local/java/j2sdk1.4.2_05//lib/tools.jar:/usr/local/java/jakarta-tomcat-5.5.3//bin/bootstrap.jar:/usr/local/java/jakarta-tomcat-5.5.3//bin/commons-logging-api.jar
25922 ? S 0:00 jsvc.exec -user tomcat -home /usr/local/java/j2sdk1.4.2_05 -Dcatalina.home=/usr/local/java/jakarta-tomcat-5.5.3 -Djava.io.tmpdir=/var/tmp -outfile /usr/local/java/jakarta-tomcat-5.5.3/logs/catalina.out -errfile &1 -cp /usr/local/java/j2sdk1.4.2_05/lib/tools.jar:/usr/local/java/jakarta-tomcat-
25923 ? S 0:01 jsvc.exec -user tomcat -home /usr/local/java/j2sdk1.4.2_05 -Dcatalina.home=/usr/local/java/jakarta-tomcat-5.5.3 -Djava.io.tmpdir=/var/tmp -outfile /usr/local/java/jakarta-tom
and this is the result of neststat
[/usr/local/jakarta/jakarta-tomcat-5.0.28/bin]# netstat -lpn |grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 25379/java
But the pages show this error
HTTP Status 404 - /Hello.jsp
type Status report
message /Hello.jsp
description The requested resource (/Hello.jsp) is not available.
Apache Tomcat/5.0.28
please advice
At that point more troubleshooting is required. Please PM me if you would like us to take a look at the issue.
Regards,
David
Forum Moderator
Hello,
This is the domains entry in server.xml
<Host name="www.sujais.com" appBase="/home/sujais/public_html">
<Context path="" reloadable="true" docBase="/home/sujais/public_html" debug="1"/>
</Host>
I dont know what is the reason for this error
Hello,
I another server where tomcat is working this is the status
netstat -lpn |grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 7730/jsvc.exec
Is tomcat working on my first server?.
Hello,
I got the tomcat server and the examples in the tomcat directory working. So I think its something with server.xml file. Any idea on this. Thanks
--Sujai
Hurray.... AT LAST I GOT IT WORKING. I INSTALLED IT MANUALLY AND MADE SOME CHANGES AND NOW ITS WORKING...... Anyway thanks for your prompt reply.
--Sujai
--Logicsupport.com
Make sure to disable the tomcat addon in whm, so it does not update it on you.
Regards,
David
Forum Moderator
Hello,
Please follow these steps to install tomcat manaually
1. Download Tomcat
====
Downloaded "5.5.3-beta tar.gz" from here:
http://jakarta.apache.org/site/binindex.cgi
Which is this file:
http://apache.ausgamers.com/jakarta/...t-5.5.3.tar.gz
This version of Tomcat likes JDK 2.5, which can be downloaded here:
http://java.sun.com/j2se/1.5.0/download.jsp
If you are going to use JDK 1.4 with Tomcat, also download the compat archive,
"5.5.3-beta Compat tar.gz" which is this file:
http://apache.ausgamers.com/jakarta/...-compat.tar.gz
2. Unzip Archive
====
Unzipped the archive:
tar xzvf jakarta-tomcat-5.5.3.tar.gz
If you downloaded the compat archive to use Tomcat with JDK 1.4, also unzip the
compat archive from the same directory as the tomcat archive itself - meaning
that the compat archive will unpack itself into the same directory as the
tomcat one just did.
tar xzvf jakarta-tomcat-5.5.3-compat.tar.gz
Remember to save both archives and run both of these tar commands from the same
directory. For example:
/usr/local
# tar xzvf jakarta-tomcat-5.5.3.tar.gz
/usr/local
# tar xzvf jakarta-tomcat-5.5.3-compat.tar.gz
Copied the folder to where I want it installed.
cp jakarta-tomcat-5.5.3 /usr/local/java/jakarta-tomcat-5.5.3
3. Set Environment Variables
====
Edited .bash_profile of "root" user to make sure $CATALINA_HOME was set:
export CATALINA_HOME=/usr/local/java/jakarta-tomcat-5.5.3
You must also make sure JAVA_HOME is set to the installation directory
of your Java installation:
export JAVA_HOME=/usr/java/j2sdk1.4.2_02
4. See Install Documentation
====
Looked at the Tomcat 5.5 Installation docs for Unix:
http://jakarta.apache.org/tomcat/tom...doc/setup.html
5. Create Daemon Startup Binary
====
As "root", I ran the following commands to make jsvc, which allows Tomcat 5 to
be run as a daemon or background thread:
# Needed if you just edited .bash_profile to add CATALINA_HOME
source ~/.bash_profile
cd $CATALINA_HOME/bin
tar xvfz jsvc.tar.gz
cd jsvc-src
autoconf
# I found ./configure did not have execute rights for root.
chmod +711 ./configure
./configure
make
cp jsvc ..
cd ..
6. Install Startup Script
====
Now that you have the binary, you need a script in place that Linux will
execute when you start up and shut down the OS.
Copied the daemon startup script to init.d:
cp $CATALINA_HOME/bin/jsvc-src/native/Tomcat5.sh \
/etc/rc.d/init.d/Tomcat5
Make sure root can execute it:
chmod +711 /etc/rc.d/init.d/Tomcat5
Put links in the rc5.d directory to make sure the Tomcat5 script was called
at run level 5 startup and shutdown (X windows level):
ln -s /etc/rc.d/init.d/Tomcat5 /etc/rc5.d/S50Tomcat5
ln -s /etc/rc.d/init.d/Tomcat5 /etc/rc5.d/K50Tomcat5
Put links in the rc3.d directory to make sure the Tomcat5 script was called
at run level 3 startup and shutdown (console level):
ln -s /etc/rc.d/init.d/Tomcat5 /etc/rc3.d/S50Tomcat5
ln -s /etc/rc.d/init.d/Tomcat5 /etc/rc3.d/K50Tomcat5
Could (instead) have put an entry in this file:
/etc/rc.local
7. Edit Startup Script
====
Edited Tomcat5.sh to fill in the appropriate details for me. The actual lines I
changed were:
JAVA_HOME=/usr/java/j2sdk1.4.2_03
CATALINA_HOME=/usr/local/java/jakarta-tomcat-5.5.3
DAEMON_HOME=/usr/local/java/jakarta-tomcat-5.5.3
TOMCAT_USER=robertmarkbram
#
# Start Tomcat
#
$DAEMON_HOME/bin/jsvc \
My actual Tomcat5.sh:
#!/bin/sh
##############################################################################
#
# Copyright 2004 The Apache Software Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##############################################################################
#
# Small shell script to show how to start/stop Tomcat using jsvc
# If you want to have Tomcat running on port 80 please modify the server.xml
# file:
#
# <!-- Define a non-SSL HTTP/1.1 Connector on port 80 -->
# <Connector className="org.apache.catalina.connector.http.HttpConnector"
# port="80" minProcessors="5" maxProcessors="75"
# enableLookups="true" redirectPort="8443"
# acceptCount="10" debug="0" connectionTimeout="60000"/>
#
# That is for Tomcat-5.0.x (Apache Tomcat/5.0)
#
# Adapt the following lines to your configuration
JAVA_HOME=/usr/java/j2sdk1.4.2_03
CATALINA_HOME=/usr/local/java/jakarta-tomcat-5.5.3
DAEMON_HOME=/usr/local/java/jakarta-tomcat-5.5.3
TOMCAT_USER=robertmarkbram
TMP_DIR=/var/tmp
CATALINA_OPTS=
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar
case "$1" in
start)
#
# Start Tomcat
#
$DAEMON_HOME/bin/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-Dcatalina.home=$CATALINA_HOME \
-Djava.io.tmpdir=$TMP_DIR \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '&1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap
#
# To get a verbose JVM
#-verbose \
# To get a debug of jsvc.
#-debug \
;;
stop)
#
# Stop Tomcat
#
PID=`cat /var/run/jsvc.pid`
kill $PID
;;
*)
echo "Usage tomcat.sh start/stop"
exit 1;;
esac
##############################################################################
8. Change Port You Run Tomcat On
====
Changed the following in $CATALINA_HOME/conf/server.xml to make Tomcat run on
port 8095 instead of the default 8080:
<Connector port="8095"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
9. Set Up Admin User
====
Edited $CATALINA_HOME/conf/tomcat-users.xml to give myself a user with
admin and manager roles:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="admin"/>
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="admin" password="admin" roles="admin,manager"/>
</tomcat-users>
Users with admin role can use the admin tool:
http://localhost:8095/admin
Users with the manager role can use manager tools like this one:
http://localhost:8095/manager/list
10. Reboot
====
Restarted my machine (with fingers crossed).
Run as root:
init 6
Or just log out and reboot!
Thanks
--Sujai
--Logicsupport.com
how to enable sites for JSP after installing it from WHM ?
or all sites will be auto-enabled?
i remember the very old tomcat module adds a link at WHM to enable sites for jsp
yes. it does add a link at the WHM. check at:
Account Functions ==> Install Servlets
that does it.
cPanel Certified Specialist
http://www.admin-ahead.com
https://ticketforge.com
AIM: tux image Skype: admin-ahead
yeah found it thanks![]()
anyone knows if its possible to upgrade JDK from 1.4.2 to 1.5.0 ? (a.k.a 5.0) ?
thanks
humm.. it is not tried out yet. anyone else who have tried ?
cPanel Certified Specialist
http://www.admin-ahead.com
https://ticketforge.com
AIM: tux image Skype: admin-ahead